mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 12:56:51 +03:00
* extfs/hp48.in: Fix quoting issues.
From Leonard den Ottolander.
This commit is contained in:
parent
e4d7245a11
commit
61b4642af4
@ -1,3 +1,9 @@
|
|||||||
|
2004-10-17 Roland Illig <roland.illig@gmx.de>
|
||||||
|
|
||||||
|
* extfs/hp48.in: Fix quoting issues.
|
||||||
|
|
||||||
|
From Leonard den Ottolander.
|
||||||
|
|
||||||
2004-10-17 Andrew V. Samoilov <sav@bcs.zp.ua>
|
2004-10-17 Andrew V. Samoilov <sav@bcs.zp.ua>
|
||||||
|
|
||||||
* undelfs.c (undelfs_open): Use g_try_malloc() instead
|
* undelfs.c (undelfs_open): Use g_try_malloc() instead
|
||||||
|
@ -32,40 +32,41 @@ $KERMIT -C "SET EXIT WARNING OFF,REMOTE $*,QUIT"
|
|||||||
hp48_cd()
|
hp48_cd()
|
||||||
{
|
{
|
||||||
(echo SET EXIT WARNING OFF;echo REMOTE HOST HOME
|
(echo SET EXIT WARNING OFF;echo REMOTE HOST HOME
|
||||||
for HP48_DIR in `echo $*|tr '/' ' '`;do
|
for HP48_DIR in `echo "$*" | tr '/' ' '`;do
|
||||||
if [ "$HP48_DIR" != "." ];then echo REMOTE HOST $HP48_DIR;fi
|
if [ "x$HP48_DIR" != "x." ];then echo REMOTE HOST "$HP48_DIR"; fi
|
||||||
done
|
done
|
||||||
echo QUIT)| $KERMIT -B >/dev/null
|
echo QUIT)| $KERMIT -B >/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
hp48_retdir()
|
hp48_retdir()
|
||||||
{
|
{
|
||||||
echo $1
|
echo "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
hp48_retsize()
|
hp48_retsize()
|
||||||
{
|
{
|
||||||
printf "%d" $2 2>/dev/null
|
printf "%d" "$2" 2>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
hp48_parser()
|
hp48_parser()
|
||||||
{
|
{
|
||||||
HP48_DIRS=
|
HP48_DIRS=
|
||||||
read INPUT
|
read -r INPUT
|
||||||
while [ "$INPUT" != "EOF" ]
|
while [ "x$INPUT" != "xEOF" ]
|
||||||
do
|
do
|
||||||
case `echo $INPUT | $AWK '{if (int($2)) if ($3=="Directory") print "dir";else print "file"}'` in
|
case `echo "$INPUT" | $AWK '{if (int($2)) if ($3 == "Directory") print "dir";else print "file"}'` in
|
||||||
dir) HP48_DIRS="$HP48_DIRS `hp48_retdir $INPUT`"
|
dir) HP48_DIRS="$HP48_DIRS `hp48_retdir \"$INPUT\"`"
|
||||||
printf "drwxr-xr-x 1 %-8d %-8d %8d %s %s\n" 0 0 `hp48_retsize $INPUT` "`date +\"%b %d %Y %k:%M"`" "$HP48_CDIR/`hp48_retdir $INPUT`";;
|
printf "drwxr-xr-x 1 %-8d %-8d %8d %s %s\n" 0 0 `hp48_retsize "$INPUT"` "`date +\"%b %d %Y %k:%M\"`" "$HP48_CDIR/`hp48_retdir \"$INPUT\"`";;
|
||||||
file) printf "-rw-r--r-- 1 %-8d %-8d %8d %s %s\n" 0 0 `hp48_retsize $INPUT` "`date +"%b %d %Y %k:%M"`" "$HP48_CDIR/`hp48_retdir $INPUT`";;
|
file) printf "-rw-r--r-- 1 %-8d %-8d %8d %s %s\n" 0 0 `hp48_retsize "$INPUT"` "`date +\"%b %d %Y %k:%M\"`" "$HP48_CDIR/`hp48_retdir \"$INPUT\"`";;
|
||||||
esac
|
esac
|
||||||
read INPUT
|
read -r INPUT
|
||||||
done
|
done
|
||||||
for HP48_DIR in $HP48_DIRS;do
|
for HP48_DIR in $HP48_DIRS;
|
||||||
HP48_PDIR=$HP48_CDIR
|
do
|
||||||
HP48_CDIR=$HP48_CDIR/$HP48_DIR; hp48_cmd HOST $HP48_DIR >/dev/null
|
HP48_PDIR="$HP48_CDIR"
|
||||||
hp48_list
|
HP48_CDIR="$HP48_CDIR/$HP48_DIR"; hp48_cmd HOST "$HP48_DIR" >/dev/null
|
||||||
HP48_CDIR=$HP48_PDIR; hp48_cmd HOST UPDIR >/dev/null
|
hp48_list
|
||||||
|
HP48_CDIR="$HP48_PDIR"; hp48_cmd HOST UPDIR >/dev/null
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,14 +85,14 @@ list) HP48_CDIR=
|
|||||||
hp48_list
|
hp48_list
|
||||||
exit 0;;
|
exit 0;;
|
||||||
copyout)
|
copyout)
|
||||||
cd `dirname $4`
|
cd `dirname "$4"`
|
||||||
hp48_cd `dirname $3`
|
hp48_cd `dirname "$3"`
|
||||||
$KERMIT -B -g `basename $3` -a $4 >/dev/null
|
$KERMIT -B -g `basename "$3"` -a "$4" >/dev/null
|
||||||
exit 0;;
|
exit 0;;
|
||||||
copyin)
|
copyin)
|
||||||
cd `dirname $4`
|
cd `dirname "$4"`
|
||||||
hp48_cd `dirname $3`
|
hp48_cd `dirname "$3"`
|
||||||
$KERMIT -B -s $4 -a `basename $3` >/dev/null
|
$KERMIT -B -s "$4" -a `basename "$3"` >/dev/null
|
||||||
exit 0;;
|
exit 0;;
|
||||||
esac
|
esac
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user