From 423db7d35a9c1408957e5591f601a888b9c13130 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Mon, 14 Jun 2010 20:31:52 +0000 Subject: [PATCH] binpackage: let's use the find -prune option to skip hierarchies. --- commands/binpackage/binpackage.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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 -- 2.44.0