mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Optimization: get rid of triple run of isoinfo -d.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
3293c5b237
commit
d9fc47453b
@ -23,12 +23,14 @@ test_iso () {
|
||||
JOLIET_OPT="-J"
|
||||
fi
|
||||
ISOINFO="isoinfo -R"
|
||||
isoinfo -d -i "$1" 2>/dev/null | @GREP@ "UCS level 1\|NO Joliet" > /dev/null || ISOINFO="$ISOINFO $JOLIET_OPT"
|
||||
|
||||
if [ `isoinfo -d -i "$1" 2>/dev/null | @GREP@ "Joliet with UCS level 3 found" | wc -l` == 1 ] ; then
|
||||
if [ `isoinfo -d -i "$1" 2>/dev/null | @GREP@ "NO Rock Ridge" | wc -l` == 1 ] ; then
|
||||
SEMICOLON="YES"
|
||||
fi
|
||||
ISOINFO_D_I="`isoinfo -d -i "$1" 2>/dev/null`"
|
||||
|
||||
echo "$ISOINFO_D_I" | @GREP@ "UCS level 1\|NO Joliet" > /dev/null || ISOINFO="$ISOINFO $JOLIET_OPT"
|
||||
|
||||
if [ `echo "$ISOINFO_D_I" | @GREP@ "Joliet with UCS level 3 found" | wc -l` = 1 \
|
||||
-a `echo "$ISOINFO_D_I" | @GREP@ "NO Rock Ridge" | wc -l` = 1 ] ; then
|
||||
SEMICOLON="YES"
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user