sm-translate/compile_all.sh
Jackz 5013c1ab09
All checks were successful
/ Sourcemod v1.12.x (push) Successful in 16s
/ Sourcemod v1.11.x (push) Successful in 18s
/ Sourcemod v1.13.x (push) Successful in 16s
/ Create release for tags (push) Has been skipped
Build Image / build (push) Successful in 44s
ci: add missing file
2026-04-12 20:59:55 -05:00

29 lines
No EOL
738 B
Bash
Executable file

#!/bin/bash
set -e
if [ -z "$SPCOMP_PATH" ]; then
SPCOMP_PATH="./sm_1_12_7177/spcomp"
fi
if [ -z "$SPCOMP_OUT_FOLDER"]; then
SPCOMP_OUT_FOLDER="plugins"
fi
if [[ "$SPCOMP_FAIL_ON_ERROR" == "1" ]]; then
echo "Failing on any plugin compilation failure"
set -e
else
echo "Continuing on plugin compilation failure"
set +e # actions sets -e
fi
# set +e
mkdir -p "$SPCOMP_OUT_FOLDER" || true
for file in scripting/*.sp; do
out_filename=$(basename "${file%.*}.smx")
echo ======= COMPILING $file =============
$SPCOMP_PATH -v 0 -i scripting/include "$file" -o "$SPCOMP_OUT_FOLDER"/"$out_filename"
echo
echo
done
if [[ "$SPCOMP_FAIL_ON_ERROR" == "1" ]]; then
echo Completed with no errors
fi