From 4afbee67cc7379bf9b7ff5ac308c4ac93381995d Mon Sep 17 00:00:00 2001
From: Mooffie <mooffie@gmail.com>
Date: Mon, 19 Dec 2016 15:11:20 +0200
Subject: [PATCH] Ticket #3730: extfs: urar: don't invoke 'rar' when running
under the tester.
We want to prevent messages printed to STDERR when running the tester on
systems where rar is not installed.
(Yes, we could compress this new code to just one line, but...)
---
src/vfs/extfs/helpers/urar.in | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/vfs/extfs/helpers/urar.in b/src/vfs/extfs/helpers/urar.in
index 35d0fca..5453d31 100644
a
|
b
|
UNRAR=`which unrar 2>/dev/null` |
21 | 21 | [ -z $UNRAR ] && UNRAR=$RAR |
22 | 22 | [ ! -x $UNRAR -a -x $RAR ] && UNRAR=$RAR |
23 | 23 | |
24 | | # Define $UNRAR version |
25 | | UNRAR_VERSION=`$UNRAR -cfg- -? | grep "Copyright" | sed -e 's/.*\([0-9]\)\..*/\1/'` |
26 | | |
27 | 24 | # Let the test framework hook in: |
28 | 25 | UNRAR=${MC_TEST_EXTFS_LIST_CMD:-$UNRAR} |
29 | | UNRAR_VERSION=${MC_TEST_EXTFS_UNRAR_VERSION:-$UNRAR_VERSION} |
| 26 | |
| 27 | # Determine the $UNRAR version |
| 28 | if [ -n "$MC_TEST_EXTFS_UNRAR_VERSION" ]; then |
| 29 | # Let the test framework fool us: |
| 30 | UNRAR_VERSION=$MC_TEST_EXTFS_UNRAR_VERSION |
| 31 | else |
| 32 | # Figure it out from rar itself: |
| 33 | UNRAR_VERSION=`$UNRAR -cfg- -? | grep "Copyright" | sed -e 's/.*\([0-9]\)\..*/\1/'` |
| 34 | fi |
30 | 35 | |
31 | 36 | mcrar4fs_list () |
32 | 37 | { |