extfs: hp48: misc fixes.

Two bugs fixed:

* "printf -rw-r--r--" made printf complain about invalid option (although
  changing it to "printf -- -rw-r--r-" is possible, we don't know how portble
  this is).

* Quotes around $INPUT defeat the purpose of the function calls (botched in
  commit 61b4642af4).
This commit is contained in:
Mooffie 2016-12-13 01:02:20 +02:00 committed by Yury V. Zaytsev
parent 4d04aa40b0
commit 019ab5c012
1 changed files with 3 additions and 3 deletions

View File

@ -77,9 +77,9 @@ read -r INPUT
while [ "x$INPUT" != "xEOF" ]
do
case `echo "$INPUT" | $AWK '{if (int($2)) if ($3 == "Directory") print "dir";else print "file"}'` in
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\"`";;
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\"`";;
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`";;
file) printf "%crw-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
read -r INPUT
done