diff options
author | Ori Bernstein <ori@eigenstate.org> | 2017-09-04 10:29:41 -0700 |
---|---|---|
committer | Ori Bernstein <ori@mmarkovcorp.com> | 2017-09-04 10:30:20 -0700 |
commit | 2b28c30518e4aeb4bfc5592773662b89c58e8663 (patch) | |
tree | a41005b7c218f74f964a568a433cceb916485b79 /mbldwrap.sh | |
parent | 87e41be1bc9bffd35472a26076cbb0470f4620ec (diff) | |
download | mc-2b28c30518e4aeb4bfc5592773662b89c58e8663.tar.gz |
Auto-bootstrap on mbld failure.
Diffstat (limited to 'mbldwrap.sh')
-rwxr-xr-x | mbldwrap.sh | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/mbldwrap.sh b/mbldwrap.sh index 33bc8dd..c1e4655 100755 --- a/mbldwrap.sh +++ b/mbldwrap.sh @@ -7,17 +7,23 @@ if test `uname` = Plan9; then export MYR_MUSE=`pwd`/muse/$O.out export MYR_MC=`pwd`/6/$O.out export MYR_RT=`pwd`/rt/_myrrt.$O - BOOT="./mk/bootstrap/bootstrap+`uname -s`-`uname -m`.sh" else export MYR_MUSE=muse export MYR_MC=6m export MYR_RT=`pwd`/rt/_myrrt.o - BOOT="./mk/bootstrap/bootstrap+`uname -s`-`uname -m`.sh" fi +BOOT="./mk/bootstrap/bootstrap+`uname -s`-`uname -m`.sh" -if [ -f mbld/mbld ] || [ -f obj/mbld/mbld ]; then - ./obj/mbld/mbld $@ || ./mbld/mbld $@ || mbld $@ || \ - (echo "Unable to run mbld $@; have you build successfully"; false) -else - mbld || $BOOT +MBLD=mbld +if [ -f obj/mbld/mbld ]; then + MBLD=obj/mbld/mbld +elif [ -f mbld/mbld ]; then + MBLD=mbld/mbld fi + +bootstrap() { + ($BOOT && mbld/mbld $@) || \ + (echo "Unable to run mbld $@; have you build successfully"; exit 1) +} + +$MBLD $@ || bootstrap $@ |