#! /bin/sh # # Written by Ralf Hoffmann # upp 0.9.0 # # (C) 2007 Ralf Hoffmann # May be distributed under the terms of the GNU General # Public License V2 or higher # # Powerpacker handler # # requires ppunpack (ftp://de.aminet.net/pub/aminet/misc/unix/) # PPUNPACK=ppunpack AWK=awk extfs_pp_list () { if test -f "$1"; then t=$(ls -l "$1" | $AWK '{print $6, $7, $8}') name=$(basename "$1" | sed 's/\(.*\)\.pp/\1/') echo "-r-------- 1 $(id -nu) $(id -ng) 0 $t $name" fi } extfs_pp_copyout () { name=$(basename "$1" | sed 's/\(.*\)\.pp/\1/') if test "$2" = "$name"; then $PPUNPACK "$1" "$3" fi } # override any locale for dates LC_ALL=C export LC_ALL umask 077 case "$1" in list) extfs_pp_list "$2" ;; copyout) shift extfs_pp_copyout "$@" ;; *) echo "extfs_pp: unknown command: \"$1\"." 1>&2 exit 1 ;; esac exit 0