From: Ben Gras Date: Mon, 14 Jun 2010 20:31:52 +0000 (+0000) Subject: binpackage: let's use the find -prune option to skip hierarchies. X-Git-Tag: v3.1.8~450 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/doc/spin.js?a=commitdiff_plain;h=423db7d35a9c1408957e5591f601a888b9c13130;p=minix.git binpackage: let's use the find -prune option to skip hierarchies. --- diff --git a/commands/binpackage/binpackage.sh b/commands/binpackage/binpackage.sh index 4c92e049b..946a0a55c 100644 --- a/commands/binpackage/binpackage.sh +++ b/commands/binpackage/binpackage.sh @@ -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