aboutsummaryrefslogtreecommitdiff
path: root/etc/bootstrap/bbot-bootstrap-freebsd.sh
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-12-12 15:07:22 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-12-12 15:07:22 +0200
commitc5650d68785f7e6d5f780273846fe2d51424f550 (patch)
tree8811279f2295b76e8ecdc240cdb6143d1184ef8d /etc/bootstrap/bbot-bootstrap-freebsd.sh
parent3576347b6852604a04dc08414a7da442cce3b0c5 (diff)
Fix bug bootstrap scripts
Diffstat (limited to 'etc/bootstrap/bbot-bootstrap-freebsd.sh')
-rwxr-xr-xetc/bootstrap/bbot-bootstrap-freebsd.sh17
1 files changed, 11 insertions, 6 deletions
diff --git a/etc/bootstrap/bbot-bootstrap-freebsd.sh b/etc/bootstrap/bbot-bootstrap-freebsd.sh
index 497225e..4c19435 100755
--- a/etc/bootstrap/bbot-bootstrap-freebsd.sh
+++ b/etc/bootstrap/bbot-bootstrap-freebsd.sh
@@ -11,12 +11,17 @@ if ! jobs="$(sysctl -n hw.ncpu)"; then
jobs=1
fi
+# Note: bootstrap script options must come before build options.
+#
"$(dirname "$0")/bbot-bootstrap.sh" \
- --make gmake \
- --make "-j$jobs" \
- "$@"
+ "$@" \
+ --make gmake \
+ --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