summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2009-08-27 06:11:19 -0400
committerDavid Cantrell <dcantrell@redhat.com>2009-08-27 11:17:54 -1000
commite02ff1722d218557b971c649f64fdfd67b595992 (patch)
treec7dda10a4506eea2f33af459a2f48fe0a9f95909 /scripts
parentdae98456cac25415bb05464138a52b583aaebb2b (diff)
downloadanaconda-e02ff1722d218557b971c649f64fdfd67b595992.tar.gz
anaconda-e02ff1722d218557b971c649f64fdfd67b595992.tar.xz
anaconda-e02ff1722d218557b971c649f64fdfd67b595992.zip
Add --localscripts option to buildinstall.
If you are working on the buildinstall scripts, you can pass the --localscripts option to buildinstall to force it to use the scripts from the current directory rather than downloading the anaconda RPM from the repo you specify, unpacking it, and using the scripts from there.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/buildinstall75
1 files changed, 44 insertions, 31 deletions
diff --git a/scripts/buildinstall b/scripts/buildinstall
index bdc7cef3a..34f5904ab 100755
--- a/scripts/buildinstall
+++ b/scripts/buildinstall
@@ -32,6 +32,7 @@ usage() {
exit 1
}
+CWD="$(pwd)"
PRODUCTPATH="anaconda"
while [ $# -gt 0 ]; do
@@ -45,6 +46,10 @@ while [ $# -gt 0 ]; do
DEBUGSTR="--debug"
shift
;;
+ --localscripts)
+ LOCALSCRIPTS="yes"
+ shift
+ ;;
# release information
--version)
@@ -177,37 +182,45 @@ done
echo "Running buildinstall..."
-pushd $BUILDINSTDIR
-BUILDARCH=`repoquery -c $yumconf --qf "%{ARCH}\n" anaconda`
-# This is a crappy implementation but x86 is the only place we currently see
-# BUILDARCH != BASEARCH (e.g. i586 != i386) so it'll suffice.
-BASEARCH=`echo $BUILDARCH | sed -e 's/i.86/i386/'`
-yumdownloader -c $yumconf anaconda || exit 1
-rpm2cpio anaconda*rpm | cpio --quiet -iumd './usr*'
-rm -f anaconda*rpm
-popd
-
-UPD_INSTROOT=./upd-instroot
-MK_IMAGES=./mk-images
-MK_TREEINFO=./maketreeinfo.py
-MK_STAMP=./makestamp.py
-BUILDINSTALL=./buildinstall
-
-for f in $UPD_INSTROOT $MK_IMAGES $MK_STAMP $MK_TREEINFO $BUILDINSTALL; do
- if [ -n "$UPDATES" -a -f $UPDATES/usr/lib/anaconda-runtime/$f ]; then
- cp -a $UPDATES/usr/lib/anaconda-runtime/$f* $BUILDINSTDIR/
- elif [ ! -f $f ]; then
- cp -a $BUILDINSTDIR/usr/lib/anaconda-runtime/$f* $BUILDINSTDIR/
- else
- cp -a $f* $BUILDINSTDIR/
- fi
-done
-
-UPD_INSTROOT=$BUILDINSTDIR/upd-instroot
-MK_IMAGES=$BUILDINSTDIR/mk-images
-MK_TREEINFO=$BUILDINSTDIR/maketreeinfo.py
-MK_STAMP=$BUILDINSTDIR/makestamp.py
-BUILDINSTALL=$BUILDINSTDIR/buildinstall
+if [ "$LOCALSCRIPTS" = "yes" ]; then
+ UPD_INSTROOT="$CWD/upd-instroot"
+ MK_IMAGES="$CWD/mk-images"
+ MK_TREEINFO="$CWD/maketreeinfo.py"
+ MK_STAMP="$CWD/makestamp.py"
+ BUILDINSTALL="$CWD/buildinstall"
+else
+ pushd $BUILDINSTDIR
+ BUILDARCH=`repoquery -c $yumconf --qf "%{ARCH}\n" anaconda`
+ # This is a crappy implementation but x86 is the only place we currently see
+ # BUILDARCH != BASEARCH (e.g. i586 != i386) so it'll suffice.
+ BASEARCH=`echo $BUILDARCH | sed -e 's/i.86/i386/'`
+ yumdownloader -c $yumconf anaconda || exit 1
+ rpm2cpio anaconda*rpm | cpio --quiet -iumd './usr*'
+ rm -f anaconda*rpm
+ popd
+
+ UPD_INSTROOT=./upd-instroot
+ MK_IMAGES=./mk-images
+ MK_TREEINFO=./maketreeinfo.py
+ MK_STAMP=./makestamp.py
+ BUILDINSTALL=./buildinstall
+
+ for f in $UPD_INSTROOT $MK_IMAGES $MK_STAMP $MK_TREEINFO $BUILDINSTALL; do
+ if [ -n "$UPDATES" -a -f $UPDATES/usr/lib/anaconda-runtime/$f ]; then
+ cp -a $UPDATES/usr/lib/anaconda-runtime/$f* $BUILDINSTDIR/
+ elif [ ! -f $f ]; then
+ cp -a $BUILDINSTDIR/usr/lib/anaconda-runtime/$f* $BUILDINSTDIR/
+ else
+ cp -a $f* $BUILDINSTDIR/
+ fi
+ done
+
+ UPD_INSTROOT=$BUILDINSTDIR/upd-instroot
+ MK_IMAGES=$BUILDINSTDIR/mk-images
+ MK_TREEINFO=$BUILDINSTDIR/maketreeinfo.py
+ MK_STAMP=$BUILDINSTDIR/makestamp.py
+ BUILDINSTALL=$BUILDINSTDIR/buildinstall
+fi
if [ -n "$UPDATES" ]; then UPDATES="--updates $UPDATES"; fi