aboutsummaryrefslogtreecommitdiff
path: root/etc/bootstrap/bbot-bootstrap-linux.sh
diff options
context:
space:
mode:
Diffstat (limited to 'etc/bootstrap/bbot-bootstrap-linux.sh')
-rwxr-xr-xetc/bootstrap/bbot-bootstrap-linux.sh17
1 files changed, 11 insertions, 6 deletions
diff --git a/etc/bootstrap/bbot-bootstrap-linux.sh b/etc/bootstrap/bbot-bootstrap-linux.sh
index 9bcd29b..f9ed447 100755
--- a/etc/bootstrap/bbot-bootstrap-linux.sh
+++ b/etc/bootstrap/bbot-bootstrap-linux.sh
@@ -8,12 +8,17 @@ if ! jobs="$(nproc)"; then
jobs=1
fi
+# Note: bootstrap script options must come before build options.
+#
"$(dirname "$0")/bbot-bootstrap.sh" \
- --make make \
- --make "-j$jobs" \
- "$@"
+ "$@" \
+ --make make \
+ --make "-j$jobs"
-# Wait a bit and shutdown.
+# If success, wait a bit and shutdown. Otherwise leave the machine running
+# for investigation.
#
-sleep 5
-sudo shutdown -h now
+if test "$?" -eq 0; then
+ sleep 5
+ sudo shutdown -h now
+fi