Newer versions of BASH (4.x?) seem to dislike using -1 for a return. Even
though it's documented as being signed, BASH complains about it, so use
255 instead.
ERROR_LOG="$tmp/failures.log"
touch $ERROR_LOG
+ERROR_RETURN=255
for m in $CORE $MODULES; do
if test -d $m; then
then
echo "$1: autoregen.sh [$tmp/$1-regen.log]" >> $ERROR_LOG
cd ..
- return -1
+ return $ERROR_RETURN
fi
echo "+ $1: autoregen.sh done"
fi
then
echo "$1: make [$tmp/$1-make.log]" >> $ERROR_LOG
cd ..
- return -1
+ return $ERROR_RETURN
fi
echo "+ $1: make done"
else
rm -rf "$tmp"
fi
+exit
}
# build core and base plugins sequentially
# exit if build fails (excluding checks)
for m in $CORE; do
build $m
- if [ $? == -1 ]; then
+ if [ $? -eq $ERROR_RETURN ]; then
beach
fi
done