}
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
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() {
bootstrap() {
./$FACTOR_BINARY -i=$BOOT_IMAGE
+ check_ret "./$FACTOR_BINARY bootstrap failed"
copy_fresh_image
}