Fix cache/toolchain creation if cache is not present.
authorArne Fitzenreiter <arne_f@ipfire.org>
Thu, 15 Oct 2009 17:52:56 +0000 (19:52 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Thu, 15 Oct 2009 17:52:56 +0000 (19:52 +0200)
make.sh

diff --git a/make.sh b/make.sh
index 2312eeb8b84a3b943e6acf5a1f31430775817852..0e6b7e5d4f4a6ccd252135db1359552ed49f1652 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -893,7 +893,7 @@ toolchain)
        buildtoolchain
        BUILDMACHINE=`uname -m`
        echo "`date -u '+%b %e %T'`: Create toolchain tar.gz for $BUILDMACHINE" | tee -a $LOGFILE
-       test -d $BASEDIR/cache/toolchains || mkdir $BASEDIR/cache/toolchains
+       test -d $BASEDIR/cache/toolchains || mkdir -p $BASEDIR/cache/toolchains
        cd $BASEDIR && tar -zc --exclude='log/_build.*.log' -f cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-$BUILDMACHINE.tar.gz \
                build/{bin,etc,usr/bin,usr/local} \
                build/tools/{bin,etc,*-linux-gnu,include,lib,libexec,sbin,share,var} \
@@ -908,7 +908,7 @@ gettoolchain)
        PACKAGE=$SNAME-$VERSION-toolchain-$TOOLCHAINVER-$BUILDMACHINE
        if [ ! -f $BASEDIR/cache/toolchains/$PACKAGE.tar.gz ]; then
                URL_TOOLCHAIN=`grep URL_TOOLCHAIN lfs/Config | awk '{ print $3 }'`
-               test -d $BASEDIR/cache/toolchains || mkdir $BASEDIR/cache/toolchains
+               test -d $BASEDIR/cache/toolchains || mkdir -p $BASEDIR/cache/toolchains
                echo "`date -u '+%b %e %T'`: Load toolchain tar.gz for $BUILDMACHINE" | tee -a $LOGFILE
                cd $BASEDIR/cache/toolchains
                wget -U "IPFireSourceGrabber/2.x" $URL_TOOLCHAIN/$PACKAGE.tar.gz $URL_TOOLCHAIN/$PACKAGE.md5 >& /dev/null