summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2000-11-29 18:21:22 +0000
committerErik Troan <ewt@redhat.com>2000-11-29 18:21:22 +0000
commitdc9a23340090da5965e9c71c42439969b258d0e3 (patch)
tree0330a752c65ea5160380a21f6726a46f4f385758 /scripts
parentaf4dfd7f75dd68649f1b18688a32bb189f752247 (diff)
downloadanaconda-dc9a23340090da5965e9c71c42439969b258d0e3.tar.gz
anaconda-dc9a23340090da5965e9c71c42439969b258d0e3.tar.xz
anaconda-dc9a23340090da5965e9c71c42439969b258d0e3.zip
added pkgorder bits
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/buildinstall38
1 files changed, 28 insertions, 10 deletions
diff --git a/scripts/buildinstall b/scripts/buildinstall
index f3eb832f2..b4adc7abc 100755
--- a/scripts/buildinstall
+++ b/scripts/buildinstall
@@ -1,11 +1,29 @@
#!/bin/bash
-if [ ! -d $1/RedHat/RPMS ]; then
- echo $1 is not a Red Hat image >&2
- exit 1
-fi
+COMPNAME=dist-7.0
+
+while [ $# -gt 0 ]; do
+ case $1 in
+ --pkgorder)
+ PKGORDER=$2
+ shift; shift
+ ;;
+ --comp)
+ COMPNAME=$2
+ shift; shift
+ ;;
+ *)
+ if [ -n "$DIR" -o ! -d $1/RedHat/RPMS ]; then
+ echo "Usage: buildinstall [--comp <component>] [--pkgorder <file>] <root>" >&2
+ exit 1
+ fi
+ DIR=$1
+ shift
+ ;;
+ esac
+done
-p=`cd $1; /bin/pwd`
+p=`cd $DIR; /bin/pwd`
BUILDINSTDIR=$p/buildinstall.tree.$$
@@ -46,20 +64,20 @@ if [ $BUILDARCH = "sparc" ]; then
fi
set -x
-if [ -x $p/RedHat/instimage/usr/lib/anaconda-runtime/pkgorder ]; then
+if [ -n "$PKGORDER" -a -x $p/RedHat/instimage/usr/lib/anaconda-runtime/pkgorder ]; then
echo "Getting package order..."
if [ -x /usr/bin/runroot ]; then
- runroot dist-7.0 --onlyone --arch $BUILDARCH \
- "cd $p/RedHat/instimage/usr/lib/anaconda-runtime; PYTHONPATH=$p/RedHat/instimage/usr/lib/anaconda ./pkgorder $p $BUILDARCH" > /tmp/pkgorder
+ runroot $COMPNAME --onlyone --arch $BUILDARCH \
+ "PYTHONPATH=$p/RedHat/instimage/usr/lib/anaconda $p/RedHat/instimage/usr/lib/anaconda-runtime/pkgorder $p $BUILDARCH" > $PKGORDER
else
- cd $p/RedHat/instimage/usr/lib/anaconda-runtime; PYTHONPATH=$p/RedHat/instimage/usr/lib/anaconda ./pkgorder $p $BUILDARCH
+ PYTHONPATH=$p/RedHat/instimage/usr/lib/anaconda $p/RedHat/instimage/usr/lib/anaconda-runtime/pkgorder $p $BUILDARCH > $PKGORDER
fi
fi
exit 0
if [ -x /usr/bin/runroot ]; then
- runroot dist-7.0 --onlyone --arch $BUILDARCH "cd $BUILDINSTDIR\; ./mk-images $p/RedHat/RPMS $p $p/image-template $BUILDARCH"
+ runroot $COMPNAME --onlyone --arch $BUILDARCH "cd $BUILDINSTDIR\; ./mk-images $p/RedHat/RPMS $p $p/image-template $BUILDARCH"
else
$MK_IMAGES $p/RedHat/RPMS $p $p/image-template $BUILDARCH
fi