2006-02-03 16:41:58 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
RC=/usr/etc/rc.package
|
|
|
|
CDDIR=PACKAGES
|
2006-03-15 16:34:12 +01:00
|
|
|
MP=/mnt
|
|
|
|
CDPACK=${MP}/install/packages
|
2006-03-15 18:02:46 +01:00
|
|
|
CDSRC=${MP}/install/package-sources
|
|
|
|
SRC=/usr/bigports
|
2006-02-03 16:41:58 +01:00
|
|
|
|
|
|
|
if [ -f "$RC" ]
|
|
|
|
then . "$RC"
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd /
|
|
|
|
|
|
|
|
if [ -n "$cddrive" ]
|
2006-03-15 16:34:12 +01:00
|
|
|
then pack=${cddrive}p2
|
|
|
|
umount $pack >/dev/null 2>&1 || true
|
|
|
|
if mount $pack $MP
|
|
|
|
then
|
|
|
|
cd $CDPACK
|
|
|
|
for package in `ls *.tar.bz`
|
|
|
|
do echo $package
|
|
|
|
grep $package List
|
|
|
|
echo -n "Install $package (y/N) ? "
|
|
|
|
read y
|
|
|
|
if [ "$y" = y -o "$y" = Y ]
|
|
|
|
then echo "Extracting $CDPACK/$package .."
|
|
|
|
cat $package | packit -
|
2006-03-15 18:02:46 +01:00
|
|
|
srcname="`echo $package | sed 's/.tar.bz/-src.tar.bz'`"
|
|
|
|
srcarc="$CDSRC/$srcname"
|
|
|
|
if [ -f "$srcarc" ]
|
|
|
|
then echo -n "Install its source (y/N) ? "
|
|
|
|
read y
|
|
|
|
if [ "$y" = y -o "$y" = Y ]
|
|
|
|
then echo "Installing $srcarc into $SRC."
|
2006-03-16 13:49:53 +01:00
|
|
|
smallbunzip2 "$srcarc" | (cd $SRC && tar xf - )
|
2006-03-15 18:02:46 +01:00
|
|
|
fi
|
|
|
|
fi
|
2006-03-15 16:34:12 +01:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
else echo "CD mount failed - skipping CD packages."
|
|
|
|
fi
|
2006-03-15 17:03:15 +01:00
|
|
|
else echo "Don't know where the install CD is."
|
2006-02-03 16:41:58 +01:00
|
|
|
fi
|
2006-02-06 11:55:38 +01:00
|
|
|
|