]> gitweb.factorcode.org Git - factor.git/commitdiff
build.sh: Don't copy the factor.image to factor.image.fresh if bootstrap fails
authorDoug Coleman <doug.coleman@gmail.com>
Thu, 30 Dec 2021 04:42:48 +0000 (22:42 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Thu, 30 Dec 2021 04:42:48 +0000 (22:42 -0600)
build.sh

index ac957f70def23b1ef50f7289d59f0b5a90299414..df725ab8b6c4f252850d4eb5a8fc584ac8f59276 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -82,6 +82,8 @@ ensure_program_installed() {
 }
 
 check_ret() {
+    # Can't execute any commands before saving $?
+    # $1 is the name of the command we are checking
     RET=$?
     if [[ $RET -ne 0 ]] ; then
        $ECHO $1 failed
@@ -681,6 +683,7 @@ copy_fresh_image() {
 
 bootstrap() {
     ./$FACTOR_BINARY -i=$BOOT_IMAGE
+    check_ret "./$FACTOR_BINARY bootstrap failed"
     copy_fresh_image
 }