minix/commands/scripts/packme.sh

49 lines
980 B
Bash
Raw Normal View History

2006-02-03 16:41:58 +01:00
#!/bin/sh
set -e
RC=/usr/etc/rc.package
CDDIR=PACKAGES
MP=/mnt
CDPACK=${MP}/install/packages
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" ]
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 -
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 - )
fi
fi
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