diff --git a/extra/buildall.sh b/extra/buildall.sh index 3d54e5e6e..96fa1da81 100755 --- a/extra/buildall.sh +++ b/extra/buildall.sh @@ -14,34 +14,6 @@ if [[ ! -f $compile_exe ]]; then exit 1 fi -# single file compile -function process_file() { - set -eu -o pipefail - f="$1" - dst="$2" - script_name="$(echo "$f" | sed 's|\.ssl$|.int|')" - gcc -E -x c -P -Werror -Wfatal-errors -o "${f}.tmp" "$f" # preprocess - - # 1 retry on wine connection reset - set +e - result_text="$(wine "$compile_exe" -n -l -q -O2 "$f.tmp" -o "$dst/$script_name" 2>&1)" # compile - result_code="$?" - set -e - if [[ "$result_code" != "0" ]]; then - set -x - if echo "$result_text" | grep -q "recvmsg: Connection reset by peer"; then - sleep 1 - wine "$compile_exe" -n -l -q -O2 "$f.tmp" -o "$dst/$script_name" # 1 retry - else - echo "Compilation failed:" - echo "$result_text" - exit 1 - fi - set +x - fi - rm -f "$f.tmp" -} - # compile all for d in $(ls $src); do if [[ -d "$src/$d" && "$d" != "template" ]]; then # if it's a dir and not a template @@ -50,7 +22,9 @@ for d in $(ls $src); do for f in $(ls | grep -i "\.ssl$"); do # build file list int="$(echo $f | sed 's|\.ssl$|.int|')" if grep -qi "^$int " "$scripts_lst" || [[ "$d" == "global" ]]; then # if file is in scripts.lst or a global script - process_file "$f" "$dst" + script_name="$(echo "$f" | sed 's|\.ssl$|.int|')" + gcc -E -x c -P -Werror -Wfatal-errors -o "${f}.tmp" "$f" # preprocess + wine "$compile_exe" -n -l -q -O2 "$f.tmp" -o "$dst/$script_name" # compile fi done cd ..