mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
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...) Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
2c17c7d28b
commit
b8f7018725
@ -21,12 +21,17 @@ UNRAR=`which unrar 2>/dev/null`
|
||||
[ -z $UNRAR ] && UNRAR=$RAR
|
||||
[ ! -x $UNRAR -a -x $RAR ] && UNRAR=$RAR
|
||||
|
||||
# Define $UNRAR version
|
||||
UNRAR_VERSION=`$UNRAR -cfg- -? | grep "Copyright" | sed -e 's/.*\([0-9]\)\..*/\1/'`
|
||||
|
||||
# Let the test framework hook in:
|
||||
UNRAR=${MC_TEST_EXTFS_LIST_CMD:-$UNRAR}
|
||||
UNRAR_VERSION=${MC_TEST_EXTFS_UNRAR_VERSION:-$UNRAR_VERSION}
|
||||
|
||||
# Determine the $UNRAR version
|
||||
if [ -n "$MC_TEST_EXTFS_UNRAR_VERSION" ]; then
|
||||
# Let the test framework fool us:
|
||||
UNRAR_VERSION=$MC_TEST_EXTFS_UNRAR_VERSION
|
||||
else
|
||||
# Figure it out from rar itself:
|
||||
UNRAR_VERSION=`$UNRAR -cfg- -? | grep "Copyright" | sed -e 's/.*\([0-9]\)\..*/\1/'`
|
||||
fi
|
||||
|
||||
mcrar4fs_list ()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user