mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Ticket #4326: iso9660: fix isoinfo check.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
9bf247805a
commit
d8b9589224
@ -93,7 +93,11 @@ xorriso_rm() {
|
||||
|
||||
# tested to comply with isoinfo 2.0's output
|
||||
test_iso () {
|
||||
which isoinfo 2>/dev/null || (echo "isoinfo not found" >&2; return 1)
|
||||
ISOINFO=$(which isoinfo 2>/dev/null)
|
||||
if test -z "$ISOINFO"; then
|
||||
echo "isoinfo not found" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
CHARSET=$(locale charmap 2>/dev/null)
|
||||
if test -z "$CHARSET"; then
|
||||
@ -101,16 +105,16 @@ test_iso () {
|
||||
fi
|
||||
if test -n "$CHARSET"; then
|
||||
CHARSET=$(echo "$CHARSET" | tr '[A-Z]' '[a-z]' | sed -e 's/^iso-/iso/')
|
||||
isoinfo -j $CHARSET -i /dev/null 2>&1 | grep "Iconv not yet supported\|Unknown charset" >/dev/null && CHARSET=
|
||||
$ISOINFO -j $CHARSET -i /dev/null 2>&1 | grep "Iconv not yet supported\|Unknown charset" >/dev/null && CHARSET=
|
||||
fi
|
||||
if test -n "$CHARSET"; then
|
||||
JOLIET_OPT="-j $CHARSET -J"
|
||||
else
|
||||
JOLIET_OPT="-J"
|
||||
fi
|
||||
ISOINFO="isoinfo -R"
|
||||
|
||||
ISOINFO_D_I="$(isoinfo -d -i "$1" 2>/dev/null)"
|
||||
ISOINFO_D_I="$($ISOINFO -d -i "$1" 2>/dev/null)"
|
||||
ISOINFO="$ISOINFO -R"
|
||||
|
||||
echo "$ISOINFO_D_I" | grep "UCS level 1\|NO Joliet" > /dev/null || ISOINFO="$ISOINFO $JOLIET_OPT"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user