(Arne Babenhauserheide)
2014-01-08: bootstrap: correctly fail with code 1 if bootstrapping failed. bootstrap: correctly fail with code 1 if bootstrapping failed.
diff --git a/bootstrap.sh b/bootstrap.sh
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -8,13 +8,13 @@ else
fi
diff=$(python3 ${srcdir}/wisp.py ${srcdir}/wisp-guile.w > 1 && guile 1 ${srcdir}/wisp-guile.w > 2 && guile 2 ${srcdir}/wisp-guile.w > wisp.scm && diff 2 wisp.scm && echo success)
-if [[ x"${diff}" == x"success" ]]; then
- echo "successfully bootstrapped wisp.scm"
- echo preparing the reader: wisp at the REPL
- mkdir -p language/wisp
- guile wisp.scm ${srcdir}/wisp-reader.w 2>/dev/null > language/wisp/spec.scm \
- && echo ...succeeded \
- && echo 'to use wisp at the REPL, run `guile -L` . and then in guile `,L wisp`'
-else
+if [[ ! x"${diff}" == x"success" ]]; then
echo "failed to bootstrap wisp.scm. diff: " ${diff}
+ exit 1
fi
+echo "successfully bootstrapped wisp.scm"
+echo preparing the reader: wisp at the REPL
+mkdir -p language/wisp
+guile wisp.scm ${srcdir}/wisp-reader.w 2>/dev/null > language/wisp/spec.scm \
+ && echo ...succeeded \
+ && echo 'to use wisp at the REPL, run `guile -L` . and then in guile `,L wisp`'