Use more portable shell in ./boot; fixes booting on Solaris
authorIan Lynagh <igloo@earth.li>
Wed, 6 May 2009 01:04:45 +0000 (01:04 +0000)
committerIan Lynagh <igloo@earth.li>
Wed, 6 May 2009 01:04:45 +0000 (01:04 +0000)
boot

diff --git a/boot b/boot
index 2c2d88b..0cdee98 100644 (file)
--- a/boot
+++ b/boot
@@ -50,7 +50,7 @@ for f in $libraries; do
    if test -f $cabals; then
        echo "Creating $f/ghc.mk"
        rm -f $f/ghc.mk
    if test -f $cabals; then
        echo "Creating $f/ghc.mk"
        rm -f $f/ghc.mk
-       pkg=`basename ${cabals%.cabal}`
+       pkg=`echo "$cabals" | sed -e 's#.*/##' -e 's#\.cabal$##'`
        if test -f $f/ghc-stage; then
            stage=`cat $f/ghc-stage`
        else
        if test -f $f/ghc-stage; then
            stage=`cat $f/ghc-stage`
        else