From c5650d68785f7e6d5f780273846fe2d51424f550 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 12 Dec 2017 15:07:22 +0200 Subject: Fix bug bootstrap scripts --- etc/bootstrap/bbot-bootstrap-freebsd.sh | 17 +++++++++++------ etc/bootstrap/bbot-bootstrap-linux.sh | 17 +++++++++++------ etc/bootstrap/bbot-bootstrap-macos.sh | 15 ++++++++++----- etc/bootstrap/bbot-bootstrap.sh | 2 +- 4 files changed, 33 insertions(+), 18 deletions(-) (limited to 'etc') 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 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 diff --git a/etc/bootstrap/bbot-bootstrap-macos.sh b/etc/bootstrap/bbot-bootstrap-macos.sh index 0aa4ec3..9c1ef1f 100755 --- a/etc/bootstrap/bbot-bootstrap-macos.sh +++ b/etc/bootstrap/bbot-bootstrap-macos.sh @@ -10,15 +10,20 @@ if ! jobs="$(sysctl -n hw.ncpu)"; then jobs=1 fi +# Note: bootstrap script options must come before build options. +# "$(dirname "$0")/bbot-bootstrap.sh" \ --cxx clang++ \ --build /tmp \ --environments "$HOME/environments" \ + "$@" \ --make make \ - --make "-j$jobs" \ - "$@" + --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 diff --git a/etc/bootstrap/bbot-bootstrap.sh b/etc/bootstrap/bbot-bootstrap.sh index df717e8..1505a4b 100755 --- a/etc/bootstrap/bbot-bootstrap.sh +++ b/etc/bootstrap/bbot-bootstrap.sh @@ -27,7 +27,7 @@ run () diag "+ $@" "$@" if test "$?" -ne "0"; then - exit 1; + exit 1 fi } -- cgit v1.1