Merge branch '2569_fix_bashisms'

* 2569_fix_bashisms:
  extfs helpers: Replace all 'gawk' occurences with @AWK@ meta variable.
  Ticket #2569: fix bashisms in extfs
This commit is contained in:
Slava Zanko 2011-07-08 12:41:48 +03:00
commit f5ff35a5f3
8 changed files with 28 additions and 12 deletions

View File

@ -535,6 +535,7 @@ src/vfs/extfs/helpers/uar
src/vfs/extfs/helpers/uarc
src/vfs/extfs/helpers/uarj
src/vfs/extfs/helpers/uc1541
src/vfs/extfs/helpers/ucab
src/vfs/extfs/helpers/uha
src/vfs/extfs/helpers/ulha
src/vfs/extfs/helpers/urar

View File

@ -17,6 +17,7 @@ s3+
ualz
uar
uarj
ucab
uha
ulha
urar

View File

@ -6,7 +6,7 @@ EXTFSCONFFILES = sfs.ini
EXTFS_MISC = README README.extfs
# Scripts hat don't need adaptation to the local system
EXTFS_CONST = bpp rpm trpm u7z ucab
EXTFS_CONST = bpp rpm trpm u7z
# Scripts that need adaptation to the local system - source files
EXTFS_IN = \
@ -30,6 +30,7 @@ EXTFS_IN = \
uarc.in \
uarj.in \
uc1541.in \
ucab.in \
uha.in \
ulha.in \
urar.in \
@ -58,6 +59,7 @@ EXTFS_OUT = \
uarc \
uarj \
uc1541 \
ucab \
uha \
ulha \
urar \

View File

@ -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"

View File

@ -9,8 +9,6 @@
# <jpelletier@ieee.org>
#
# Define your awk
AWK=gawk
# Define which archiver you are using with appropriate options
ACE_LIST="unace l"
ACE_GET="unace x"
@ -22,7 +20,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" | @AWK@ -v uid=$UID '
BEGIN { Month="JanFebMarAprMayJunJulAugSepOctNovDec" }
/%/ {
split($1,date,".")

View File

@ -7,8 +7,6 @@
# <jpelletier@ieee.org>
#
# Define your awk
AWK=gawk
# Define which archiver you are using with appropriate options
ARC_LIST="arc v"
ARC_GET="arc x"
@ -19,7 +17,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" | @AWK@ -v uid=$UID '
BEGIN { }
/^Name/ { next }
/===/ { next }

View File

@ -12,15 +12,19 @@
# <jpelletier@ieee.org>
#
# Define your awk
AWK=gawk
# Define which archiver you are using with appropriate options
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 | @AWK@ -v uid=$UID '
BEGIN { FS = "\"" }
/No LINES!/ { next }
/BLOCKS FREE/ { next }

View File

@ -4,7 +4,7 @@ CAB=cabextract
mccabfs_list ()
{
$CAB -l "$1" | gawk -v uid=`id -un` -v gid=`id -gn` '
$CAB -l "$1" | @AWK@ -v uid=`id -un` -v gid=`id -gn` '
BEGIN { flag=0 }
/^-------/ { flag++; if (flag > 1) exit 0; next }
{