mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2025-05-01 09:29:33 +03:00
Update compile.sh
- Add ability to compile multiple files thru args
This commit is contained in:
parent
0bd69445f9
commit
a015692309
@ -1,24 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash -e
|
||||||
|
cd "$(dirname "$0")"
|
||||||
# AMX Mod X
|
|
||||||
#
|
|
||||||
# by the AMX Mod X Development Team
|
|
||||||
# originally developed by OLO
|
|
||||||
#
|
|
||||||
# This file is part of AMX Mod X.
|
|
||||||
|
|
||||||
# new code contributed by \malex\
|
|
||||||
|
|
||||||
test -e compiled || mkdir compiled
|
test -e compiled || mkdir compiled
|
||||||
rm -f temp.txt
|
|
||||||
|
|
||||||
|
if [[ $# -ne 0 ]]; then
|
||||||
|
for sourcefile in "$@"
|
||||||
|
do
|
||||||
|
amxxfile="`echo $sourcefile | sed -e 's/\.sma$/\.amxx/'`"
|
||||||
|
echo -e "\nCompiling $sourcefile..."
|
||||||
|
./amxxpc $sourcefile -ocompiled/$amxxfile
|
||||||
|
done
|
||||||
|
else
|
||||||
for sourcefile in *.sma
|
for sourcefile in *.sma
|
||||||
do
|
do
|
||||||
amxxfile="`echo $sourcefile | sed -e 's/\.sma$/.amxx/'`"
|
amxxfile="`echo $sourcefile | sed -e 's/\.sma$/\.amxx/'`"
|
||||||
echo -n "Compiling $sourcefile ..."
|
echo -e "\nCompiling $sourcefile ..."
|
||||||
./amxxpc $sourcefile -ocompiled/$amxxfile >> temp.txt
|
./amxxpc $sourcefile -ocompiled/$amxxfile
|
||||||
echo "done"
|
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
less temp.txt
|
|
||||||
rm temp.txt
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user