From 04ad142c761ff7edc5d19951e2892b55cca2ed2a Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Sun, 26 Mar 2006 18:01:39 +0000 Subject: [PATCH] package/release tweaks --- commands/scripts/packman.sh | 62 ++++++++++++++++++++++++++++++++++--- tools/release.sh | 15 ++++++++- 2 files changed, 71 insertions(+), 6 deletions(-) diff --git a/commands/scripts/packman.sh b/commands/scripts/packman.sh index 0e8266957..5b58d7bee 100644 --- a/commands/scripts/packman.sh +++ b/commands/scripts/packman.sh @@ -45,19 +45,71 @@ then pack=${cddrive}p2 else echo "Don't know where the install CD is. You can set it in $RC." fi +# For local testing +cdpackages=/usr/bigports/Packages/List +CDPACK=/usr/bigports/Packages +CDSRC=/usr/bigports/Sources + if [ "$cdpackages" = "" ] then echo "Skipping CD packages." +else cont=y + while [ $cont = y ] + do n="`wc -l $cdpackages | awk '{ print $1 }'`" + sourcef=$CDSRC/SizeMB + if [ -f $sourcef ] + then sourcesize=" (`cat $sourcef` MB uncompressed)" + else sourcesize="" + fi + binf=$CDPACK/SizeMB + if [ -f $binf ] + then binsize=" (`cat $binf` MB uncompressed)" + else binsize="" + fi + + echo "There are $n CD packages." + echo "Please choose:" + echo " 1 Install all $n binary packages$binsize from CD" + echo " 2 Install all $n binary packages + sources from CD$sourcesize" + echo " 3 Display the list of packages on CD" + echo " 4 Let me select individual packages to install from CD" + echo -n "Choice: [4] " + read in + case "$in" in + 1|2) + cd $CDPACK || exit + echo " * Installing binaries .." + for f in *.tar.bz2 + do echo "Installing $f binaries .." + packit $f && echo Installed $f + done + if [ "$in" = 2 ] + then + cd $SRC || exit + echo " * Installing sources .." + for f in $CDSRC/*.tar.bz2 + do echo "Installing $f in $SRC .." + smallbunzip2 -dc $f | tar xf - + done + fi + ;; + 3) + ( echo "Displaying list; press q to leave it, space for more." + cat "$CDPACK/List" | awk -F'|' '{ printf "%-20s %s\n", $1, $2 }' + ) | more + ;; + ""|4) + echo "Ok, showing packages to install." ; echo + cont=n + esac + done + echo -n "Press RETURN to continue .. " + read xyzzy fi TMPF=$TMPDIR/.list.$$ rm -f $TMPF rm -f $TMPDIR/.* # Remove any remaining .postinstall script or .list* -# For local testing -#cdpackages=/usr/bigports/Packages/List -#CDPACK=/usr/bigports/Packages -#CDSRC=/usr/bigports/Sources - netpackages="" if &2 + p="`echo $p | sed 's/.tar.bz2//'`" descr="../$p/.descr" if [ -f "$descr" ] then echo "$p|`cat $descr`" fi done >List ) + for d in $PACKAGEDIR $PACKAGESOURCEDIR + do echo Counting size of $d + f=$d/SizeMB + if [ ! -f $f ] + then + b="`bzip2 -dc $d/*.bz2 | wc -c`" + echo "`expr 1 + $b / 1024 / 1024`" >$f + fi + echo "`cat $f` MB." + done echo " * Transfering $PACKAGEDIR to $RELEASEPACKAGE" cp $PACKAGEDIR/* $RELEASEPACKAGE/ echo " * Transfering $PACKAGESOURCEDIR to $RELEASEPACKAGESOURCES" cp $PACKAGESOURCEDIR/* $RELEASEPACKAGESOURCES/ + fi # Make sure compilers and libraries are bin-owned -- 2.44.0