mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 04:22:34 +03:00
Ticket #2569: fix bashisms in extfs
Several extfs scripts (notably iso9660) don't work on linux distributions using dash as the default shell. This patch fixes all current problems in extfs reported by checkbashisms utility. Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
0b71156473
commit
b0ba12d49c
@ -78,7 +78,7 @@ BEGIN {
|
||||
}
|
||||
|
||||
mcisofs_copyout () {
|
||||
if [ "x$SEMICOLON" == "xYES" ]; then
|
||||
if [ "x$SEMICOLON" = "xYES" ]; then
|
||||
$ISOINFO -i "$1" -x "/$2;1" 2>/dev/null > "$3"
|
||||
else
|
||||
$ISOINFO -i "$1" -x "/$2" 2>/dev/null > "$3"
|
||||
|
@ -22,7 +22,13 @@ ACE_GET="unace x"
|
||||
# ls:
|
||||
mc_ace_fs_list()
|
||||
{
|
||||
$ACE_LIST "$1" | gawk -v uid=${UID-0} '
|
||||
if [ "x$UID" = "x" ]; then
|
||||
UID=`id -ru 2>/dev/null`
|
||||
if [ "x$UID" = "x" ]; then
|
||||
UID=0
|
||||
fi
|
||||
fi
|
||||
$ACE_LIST "$1" | gawk -v uid=$UID '
|
||||
BEGIN { Month="JanFebMarAprMayJunJulAugSepOctNovDec" }
|
||||
/%/ {
|
||||
split($1,date,".")
|
||||
|
@ -19,7 +19,13 @@ ARC_DEL="arc d"
|
||||
|
||||
mc_arc_fs_list()
|
||||
{
|
||||
$ARC_LIST "$1" | gawk -v uid=${UID-0} '
|
||||
if [ "x$UID" = "x" ]; then
|
||||
UID=`id -ru 2>/dev/null`
|
||||
if [ "x$UID" = "x" ]; then
|
||||
UID=0
|
||||
fi
|
||||
fi
|
||||
$ARC_LIST "$1" | gawk -v uid=$UID '
|
||||
BEGIN { }
|
||||
/^Name/ { next }
|
||||
/===/ { next }
|
||||
|
@ -20,7 +20,13 @@ C1541="c1541"
|
||||
# There are no time stamps in the disk image, so a bogus timestamp is displayed
|
||||
mc_c1541_fs_list()
|
||||
{
|
||||
$C1541 "$1" -list | gawk -v uid=${UID-0} '
|
||||
if [ x"$UID" = x ]; then
|
||||
UID=`id -ru 2>/dev/null`
|
||||
if [ "x$UID" = "x" ]; then
|
||||
UID=0
|
||||
fi
|
||||
fi
|
||||
$C1541 "$1" -list | gawk -v uid=$UID '
|
||||
BEGIN { FS = "\"" }
|
||||
/No LINES!/ { next }
|
||||
/BLOCKS FREE/ { next }
|
||||
|
Loading…
Reference in New Issue
Block a user