From 8dd76cb556a633b2b18fcf42568f24e423ecb050 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Mon, 10 Apr 2006 14:18:54 +0000 Subject: [PATCH] -p option to not include packages Fix usage kb issue - don't count packages --- tools/release.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tools/release.sh b/tools/release.sh index 704f527b6..172e4d213 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -97,12 +97,13 @@ BS=4096 HDEMU=0 COPY=0 CVSTAG=HEAD +PACKAGES=1 -while getopts "chu?" c +while getopts "pchu?" c do case "$c" in \?) - echo "Usage: $0 [-c] [-h] [-r ] [-u]" >&2 + echo "Usage: $0 [-p] [-c] [-h] [-r ] [-u]" >&2 exit 1 ;; h) @@ -114,6 +115,9 @@ do echo " * Copying, not CVS" COPY=1 ;; + p) + PACKAGES=0 + ;; r) CVSTAG=$OPTARG ;; @@ -246,7 +250,7 @@ mkdir -p $RELEASEPACKAGESOURCES echo " * Transfering $COPYITEMS to $RELEASEDIR" ( cd / && tar cf - $COPYITEMS ) | ( cd $RELEASEDIR && tar xf - ) || exit 1 -if [ -d $PACKAGEDIR -a -d $PACKAGESOURCEDIR ] +if [ -d $PACKAGEDIR -a -d $PACKAGESOURCEDIR -a $PACKAGES -ne 0 ] then echo " * Indexing packages" bintotal=0 ( cd $PACKAGEDIR @@ -319,10 +323,11 @@ fi echo $version_pretty >$RELEASEDIR/etc/version echo " * Counting files" -df $TMPDISK | tail -1 | awk '{ print $4 }' >$RELEASEDIR/.usrkb +extrakb=`du -s $RELEASEDIR/usr/install | awk '{ print $1 }'` +expr `df $TMPDISK | tail -1 | awk '{ print $4 }'` - $extrakb >$RELEASEDIR/.usrkb du -s $RELEASEDIR/usr/src.* | awk '{ t += $1 } END { print t }' >$RELEASEDIR/.extrasrckb ( for d in $RELEASEDIR/usr/src.*; do find $d; done) | wc -l >$RELEASEDIR/.extrasrcfiles -find $RELEASEDIR/usr | wc -l >$RELEASEDIR/.usrfiles +find $RELEASEDIR/usr | fgrep -v /install/ | wc -l >$RELEASEDIR/.usrfiles find $RELEASEDIR -xdev | wc -l >$RELEASEDIR/.rootfiles echo " * Zeroing remainder of temporary areas" df $TMPDISK -- 2.44.0