]> Zhao Yanbai Git Server - minix.git/commitdiff
binpackage: let's use the find -prune option to skip hierarchies.
authorBen Gras <ben@minix3.org>
Mon, 14 Jun 2010 20:31:52 +0000 (20:31 +0000)
committerBen Gras <ben@minix3.org>
Mon, 14 Jun 2010 20:31:52 +0000 (20:31 +0000)
commands/binpackage/binpackage.sh

index 4c92e049b7f9e041c8647d98867cab143d825e93..946a0a55c0e037ba12e6c0ef87fdaf5f76cc706c 100644 (file)
@@ -44,6 +44,14 @@ if [ -f $rc ]
 then    . $rc
 fi
 binsizes $binsizes
+
+prunedirs="$srcdir dev tmp usr/bigports usr/src usr/tmp usr/log usr/adm usr/run home etc/utmp var/run var/log /var/spool"
+
+for d in $prunedirs
+do     pruneexpr="$pruneexpr $n -path /$d -prune"
+       n="-o "
+done
+
 touch $packagestart
 sleep 1
 cd $dir
@@ -60,7 +68,13 @@ fi
 
 echo " * Building package"
 echo "Minix package $dir built `date`." >$INFO
-( echo $INFO ; if [ -f $PI ]; then echo $PI; fi; find / -cnewer $packagestart | egrep -v "^($srcdir|/(dev|tmp)|/usr/(src|tmp|log|adm|run)|/home|/etc/utmp|/var/(run|log|spool))" | fgrep -v /.svn ) | pax -w -d | bzip2 >$tarbz
+(
+       echo $INFO
+       if [ -f $PI ]
+       then    echo $PI
+       fi
+       find / \( $pruneexpr \) -o -cnewer $packagestart -print | fgrep -v /.svn
+) | pax -w -d | bzip2 >$tarbz
 rm -f $packagestart $findlist $tarcmd
 binsizes normal
 mv $tarbz $pdir