docker-spcomp/compile.sh
2025-05-21 00:26:35 -05:00

17 lines
367 B
Bash
Executable file

#!/bin/bash
set -e
test -e plugins || mkdir plugins
sm_dir=$PWD
echo SM Dir: $sm_dir
if [[ "$1" ]]; then
echo Source directory: $1
cd "$1"
fi
for sourcefile in scripting/*.sp
do
smxfile=$(basename "$sourcefile" .sp).smx
echo -e "\nCompiling \"$sourcefile\" -> \"plugins/$smxfile\" ..."
$sm_dir/spcomp64 "$sourcefile" -o "plugins/$smxfile"
done