sourcemod/plugins/compile.sh

21 lines
452 B
Bash
Raw Normal View History

2016-10-24 15:50:24 +02:00
#!/bin/bash -e
cd "$(dirname "$0")"
test -e compiled || mkdir compiled
if [[ $# -ne 0 ]]; then
2016-10-24 15:50:24 +02:00
for sourcefile in "$@"
do
2016-10-24 15:50:24 +02:00
smxfile="`echo $sourcefile | sed -e 's/\.sp$/\.smx/'`"
echo -e "\nCompiling $sourcefile..."
./spcomp $sourcefile -ocompiled/$smxfile
done
else
for sourcefile in *.sp
do
smxfile="`echo $sourcefile | sed -e 's/\.sp$/\.smx/'`"
2016-10-24 15:50:24 +02:00
echo -e "\nCompiling $sourcefile ..."
./spcomp $sourcefile -ocompiled/$smxfile
done
fi