fi
here=`pwd`
-srcdir=$here/$dir
+
+case "$dir" in
+/*) srcdir="$dir" ;;
+*) srcdir="$here/$dir" ;;
+esac
+
+case $2 in
+/*) pdir="$2" ;;
+*) pdir="$here/$2" ;;
+esac
+
packagestart=$srcdir/now
findlist=$srcdir/findlist
-tarfile=${dir}.tar
-tar=$srcdir/$tarfile
+tar=$srcdir/"`basename ${dir}`".tar
tarbz=$tar.bz
-pdir="$2"
mkdir $pdir 2>/dev/null || true
binsizes big
( if [ -f $PI ]; then echo $PI; fi; find / -cnewer $packagestart | egrep -v "^($srcdir|/(dev|tmp)|/usr/(tmp|log|adm|run|src)|/etc/utmp|/var/run)" ) | pax -w -d | bzip2 >$tarbz
rm -f $packagestart $findlist $tarcmd
binsizes normal
-mv $tarbz $here/$pdir
+mv $tarbz $pdir
exit 0