From acac3c84f44d6767fb4e3a603243a044e420ab63 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Fri, 17 Mar 2006 12:27:20 +0000 Subject: [PATCH] Fixes for absolute path names. --- commands/scripts/binpackage.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/commands/scripts/binpackage.sh b/commands/scripts/binpackage.sh index ebcfdabb6..a32e30f95 100644 --- a/commands/scripts/binpackage.sh +++ b/commands/scripts/binpackage.sh @@ -19,13 +19,21 @@ then echo "Error: $dir isn't a directory." 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 @@ -43,5 +51,5 @@ echo " * Building package" ( 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 -- 2.44.0