diff --git a/vfs/ChangeLog b/vfs/ChangeLog index 47fd20e34..d74510576 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,5 +1,12 @@ 2002-12-13 Pavel Roskin + * extfs/uarj.in: New script working with open-source ARJ. + Contributed by Viatcheslav Odintsov. + * extfs/uarj: Remove. + * extfs/hp48: Rename to ... + * extfs/hp48.in: ... this. It needs awk substitution. + * extfs/Makefile.am: Adjust for the above. + * extfs/ulha.in: Strengthen quoting. * extfs/uha.in: Strengthen quoting. Remove unnecessary space diff --git a/vfs/extfs/Makefile.am b/vfs/extfs/Makefile.am index 737dbde5e..c3c13d9a0 100644 --- a/vfs/extfs/Makefile.am +++ b/vfs/extfs/Makefile.am @@ -4,7 +4,7 @@ extfsdir = $(pkgdatadir)/extfs EXTFS_MISC = README extfs.ini sfs.ini # Scripts hat don't need adaptation to the local system -EXTFS_CONST = bpp hp48 rpm trpm uarj +EXTFS_CONST = bpp rpm trpm # Scripts that need adaptation to the local system - source files EXTFS_IN = \ @@ -15,11 +15,13 @@ EXTFS_IN = \ deba.in \ debd.in \ dpkg.in \ + hp48.in \ lslR.in \ mailfs.in \ patchfs.in \ rpms.in \ uar.in \ + uarj.in \ uha.in \ ulha.in \ urar.in \ @@ -35,11 +37,13 @@ EXTFS_OUT = \ deba \ debd \ dpkg \ + hp48 \ lslR \ mailfs \ patchfs \ rpms \ uar \ + uarj \ uha \ ulha \ urar \ diff --git a/vfs/extfs/hp48 b/vfs/extfs/hp48.in similarity index 95% rename from vfs/extfs/hp48 rename to vfs/extfs/hp48.in index 20e48f5da..6fbab6857 100644 --- a/vfs/extfs/hp48 +++ b/vfs/extfs/hp48.in @@ -21,7 +21,7 @@ # # Make sure you have kermit installed and that it's using the right serial # device by changing /dev/ttyXX on the next line -AWK=awk +AWK=@AWK@ KERMIT="kermit -l /dev/ttyS1 -b 9600" hp48_cmd() @@ -54,7 +54,7 @@ HP48_DIRS= read INPUT while [ "$INPUT" != "EOF" ] 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`" 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`";; diff --git a/vfs/extfs/uarj b/vfs/extfs/uarj deleted file mode 100644 index 1bda89fa3..000000000 --- a/vfs/extfs/uarj +++ /dev/null @@ -1,61 +0,0 @@ -#! /bin/sh -# -# Written by Pavel Roskin -# Copyright (C) 2002 Free Software Foundation. -# -# This filesystem doesn't support file extraction due to limitations of -# unarj, which cannot extract a single file. - - -UNARJ=unarj - -mcarjfs_list () -{ - TMPDIR="/tmp/mctmpdir-uarj.$$" - mkdir $TMPDIR || exit 1 - cd $TMPDIR - - # "unarj t" gives filenames with path, "unarj l" gives other attributes - $UNARJ t "$1" | grep "^Testing" | cut -c 12-38 >testlist - $UNARJ l "$1" | sed -n -e '/------------/,/------------/p' | \ - sed -e '1d;$d' | cut -c 1-58 >list - - # Put long names into environment variables name_N - i=0 - exec .*/) { + symfile = " -> "$3 + perm="l"substr(perm, 2) + } + + if ($0 ~ /^[\t ]+Owner: UID [0-9]+\, GID [0-9]+/) { + uid=$3 + gid=$5 + owner=1 + } + }' + #2>/dev/null +} + + +mcarjfs_copyout () +{ + $ARJ p "$1" "$2" > "$3" 2>/dev/null +} + + +umask 077 +cmd="$1" +shift +case "$cmd" in + list) mcarjfs_list "$@" ;; + copyout) mcarjfs_copyout "$@" ;; + *) exit 1 ;; +esac +exit 0