]> gitweb.factorcode.org Git - factor.git/blobdiff - build.sh
add xdg-state-dir
[factor.git] / build.sh
index 86aeea9645ceef9c44c973c6175b62b00aa6e2a1..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
@@ -329,7 +331,7 @@ find_num_cores() {
 find_word_size() {
     if [[ -n $WORD ]] ; then return; fi
     $ECHO "Finding WORD..."
-    WORD=$(find_word_size_cpp || find_word_size_c)
+    WORD=$(getconf LONG_BIT || find_word_size_cpp || find_word_size_c)
 }
 
 find_word_size_cpp() {
@@ -681,6 +683,7 @@ copy_fresh_image() {
 
 bootstrap() {
     ./$FACTOR_BINARY -i=$BOOT_IMAGE
+    check_ret "./$FACTOR_BINARY bootstrap failed"
     copy_fresh_image
 }