diff options
author | Daniel Robbins <drobbins@gentoo.org> | 2002-03-19 01:20:12 +0000 |
---|---|---|
committer | Daniel Robbins <drobbins@gentoo.org> | 2002-03-19 01:20:12 +0000 |
commit | 832666e11e12f50b4f8bf099fe0ada0379fb63b5 (patch) | |
tree | 61ee4c46011f83361aa1ab2ab22827b809945f58 /scripts | |
parent | Fixed #1196 (diff) | |
download | gentoo-2-832666e11e12f50b4f8bf099fe0ada0379fb63b5.tar.gz gentoo-2-832666e11e12f50b4f8bf099fe0ada0379fb63b5.tar.bz2 gentoo-2-832666e11e12f50b4f8bf099fe0ada0379fb63b5.zip |
fixums for 1.0
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/bootstrap.sh | 47 |
1 files changed, 30 insertions, 17 deletions
diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 75a60aaae0f0..8cfd3fcb0f75 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -1,13 +1,26 @@ #!/bin/sh -MYPROFILE=default-1.0_rc6 - +MYPROFILEDIR=`readlink -f /etc/make.profile` +if [ ! -d $MYPROFILEDIR ] +then + echo '!!! Error: '"$MYPROFILEDIR does not exist. Exiting." + exit 1 +fi + +if [ -e /usr/bin/spython ] +then + #1.0_rc6 and earlier + PYTHON=/usr/bin/spython +else + #1.0 and later + PYTHON=/usr/bin/python +fi #We really need to upgrade baselayout now that it's possible: -myBASELAYOUT=`cat /usr/portage/profiles/${MYPROFILE}/packages | grep -v '^#' | grep sys-apps/baselayout | sed 's:^\*::'` -myPORTAGE=`cat /usr/portage/profiles/${MYPROFILE}/packages | grep -v '^#' | grep sys-apps/portage | sed 's:^\*::'` -myGETTEXT=`cat /usr/portage/profiles/${MYPROFILE}/packages | grep -v '^#' | grep sys-devel/gettext | sed 's:^\*::'` -myBINUTILS=`cat /usr/portage/profiles/${MYPROFILE}/packages | grep -v '^#' | grep sys-devel/binutils | sed 's:^\*::'` -myGCC=`cat /usr/portage/profiles/${MYPROFILE}/packages | grep -v '^#' | grep sys-devel/gcc | sed 's:^\*::'` -myGLIBC=`cat /usr/portage/profiles/${MYPROFILE}/packages | grep -v '^#' | grep sys-libs/glibc | sed 's:^\*::'` +myBASELAYOUT=`cat ${MYPROFILEDIR}/packages | grep -v '^#' | grep sys-apps/baselayout | sed 's:^\*::'` +myPORTAGE=`cat ${MYPROFILEDIR}/packages | grep -v '^#' | grep sys-apps/portage | sed 's:^\*::'` +myGETTEXT=`cat ${MYPROFILEDIR}/packages | grep -v '^#' | grep sys-devel/gettext | sed 's:^\*::'` +myBINUTILS=`cat ${MYPROFILEDIR}/packages | grep -v '^#' | grep sys-devel/binutils | sed 's:^\*::'` +myGCC=`cat ${MYPROFILEDIR}/packages | grep -v '^#' | grep sys-devel/gcc | sed 's:^\*::'` +myGLIBC=`cat ${MYPROFILEDIR}/packages | grep -v '^#' | grep sys-libs/glibc | sed 's:^\*::'` echo "Using $myBASELAYOUT" echo "Using $myPORTAGE" @@ -22,29 +35,29 @@ cleanup() { } #USE may be set from the environment so we back it up for later. -export ORIGUSE="`spython -c 'import portage; print portage.settings["USE"];'`" -export GENTOO_MIRRORS="`spython -c 'import portage; print portage.settings["GENTOO_MIRRORS"];'`" +export ORIGUSE="`$PYTHON -c 'import portage; print portage.settings["USE"];'`" +export GENTOO_MIRRORS="`$PYTHON -c 'import portage; print portage.settings["GENTOO_MIRRORS"];'`" export USE="build" #get correct CFLAGS, CHOST, CXXFLAGS, MAKEOPTS since make.conf will be #overwritten cp /etc/make.conf /etc/make.conf.build -export CFLAGS="`spython -c 'import portage; print portage.settings["CFLAGS"];'`" -export CHOST="`spython -c 'import portage; print portage.settings["CHOST"];'`" -export CXXFLAGS="`spython -c 'import portage; print portage.settings["CXXFLAGS"];'`" -export MAKEOPTS="`spython -c 'import portage; print portage.settings["MAKEOPTS"];'`" -PROXY="`spython -c 'import portage; print portage.settings["PROXY"];'`" +export CFLAGS="`$PYTHON -c 'import portage; print portage.settings["CFLAGS"];'`" +export CHOST="`$PYTHON -c 'import portage; print portage.settings["CHOST"];'`" +export CXXFLAGS="`$PYTHON -c 'import portage; print portage.settings["CXXFLAGS"];'`" +export MAKEOPTS="`$PYTHON -c 'import portage; print portage.settings["MAKEOPTS"];'`" +PROXY="`$PYTHON -c 'import portage; print portage.settings["PROXY"];'`" if [ -n "${PROXY}" ] then echo "exporting PROXY=${PROXY}" export PROXY fi -HTTP_PROXY="`spython -c 'import portage; print portage.settings["HTTP_PROXY"];'`" +HTTP_PROXY="`$PYTHON -c 'import portage; print portage.settings["HTTP_PROXY"];'`" if [ -n "${HTTP_PROXY}" ] then echo "exporting HTTP_PROXY=${HTTP_PROXY}" export HTTP_PROXY fi -FTP_PROXY="`spython -c 'import portage; print portage.settings["FTP_PROXY"];'`" +FTP_PROXY="`$PYTHON -c 'import portage; print portage.settings["FTP_PROXY"];'`" if [ -n "${FTP_PROXY}" ] then echo "exporting FTP_PROXY=${FTP_PROXY}" |