package/release tweaks
This commit is contained in:
parent
27c0f507f9
commit
04ad142c76
2 changed files with 71 additions and 6 deletions
|
@ -45,19 +45,71 @@ then pack=${cddrive}p2
|
||||||
else echo "Don't know where the install CD is. You can set it in $RC."
|
else echo "Don't know where the install CD is. You can set it in $RC."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# For local testing
|
||||||
|
cdpackages=/usr/bigports/Packages/List
|
||||||
|
CDPACK=/usr/bigports/Packages
|
||||||
|
CDSRC=/usr/bigports/Sources
|
||||||
|
|
||||||
if [ "$cdpackages" = "" ]
|
if [ "$cdpackages" = "" ]
|
||||||
then echo "Skipping CD packages."
|
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
|
fi
|
||||||
|
|
||||||
TMPF=$TMPDIR/.list.$$
|
TMPF=$TMPDIR/.list.$$
|
||||||
rm -f $TMPF
|
rm -f $TMPF
|
||||||
rm -f $TMPDIR/.* # Remove any remaining .postinstall script or .list*
|
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=""
|
netpackages=""
|
||||||
if </dev/tcp
|
if </dev/tcp
|
||||||
then if [ -f $LISTFILE ]
|
then if [ -f $LISTFILE ]
|
||||||
|
|
|
@ -247,19 +247,32 @@ echo " * Transfering $COPYITEMS to $RELEASEDIR"
|
||||||
|
|
||||||
if [ -d $PACKAGEDIR -a -d $PACKAGESOURCEDIR ]
|
if [ -d $PACKAGEDIR -a -d $PACKAGESOURCEDIR ]
|
||||||
then echo " * Indexing packages"
|
then echo " * Indexing packages"
|
||||||
|
bintotal=0
|
||||||
( cd $PACKAGEDIR
|
( cd $PACKAGEDIR
|
||||||
for p in *.tar.bz2
|
for p in *.tar.bz2
|
||||||
do p="`echo $p | sed 's/.tar.bz2//'`"
|
do echo $p >&2
|
||||||
|
p="`echo $p | sed 's/.tar.bz2//'`"
|
||||||
descr="../$p/.descr"
|
descr="../$p/.descr"
|
||||||
if [ -f "$descr" ]
|
if [ -f "$descr" ]
|
||||||
then echo "$p|`cat $descr`"
|
then echo "$p|`cat $descr`"
|
||||||
fi
|
fi
|
||||||
done >List
|
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"
|
echo " * Transfering $PACKAGEDIR to $RELEASEPACKAGE"
|
||||||
cp $PACKAGEDIR/* $RELEASEPACKAGE/
|
cp $PACKAGEDIR/* $RELEASEPACKAGE/
|
||||||
echo " * Transfering $PACKAGESOURCEDIR to $RELEASEPACKAGESOURCES"
|
echo " * Transfering $PACKAGESOURCEDIR to $RELEASEPACKAGESOURCES"
|
||||||
cp $PACKAGESOURCEDIR/* $RELEASEPACKAGESOURCES/
|
cp $PACKAGESOURCEDIR/* $RELEASEPACKAGESOURCES/
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Make sure compilers and libraries are bin-owned
|
# Make sure compilers and libraries are bin-owned
|
||||||
|
|
Loading…
Reference in a new issue