Remove building with NOCRYPTO option
[minix.git] / minix / commands / pkgin_cd / pkgin_cd.sh
blobc4a0341c8b540bca14d174fbee3fc5e31c53911e
1 #!/bin/sh
3 # This script can be used to install packages from the
4 # the installation CD-ROM.
6 RC=/usr/etc/rc.package
7 CDPATH=packages/$(uname -r)/$(uname -m)/All
8 PACKSUM=pkg_summary.bz2
10 # Run user rc script
11 if [ -f "$RC" ]
12 then
13 . "$RC"
16 # Mount CD
17 if [ -n "$cddrive" ]
18 then
19 if [ -z $(mount | grep 'on /mnt ') ]
20 then
21 echo "Mounting $cddrive on /mnt."
22 mount $cddrive /mnt
26 # Find package summary
27 for i in / /mnt
29 if [ -f $i/$CDPATH/$PACKSUM ]
30 then
31 (>&2 echo "Found package summary at $i/$CDPATH/$PACKSUM.")
33 # Set package repo to CD and populate package db
34 export PKG_REPOS=$i/$CDPATH/
35 pkgin update
37 # Run pkgin
38 exec pkgin $@
40 done
42 echo "Can't find package summary. Please mount CD first at /mnt and make sure"
43 echo "that $CDPATH/$PACKSUM exists on the CD."
44 exit 1