mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2025-01-12 06:48:04 +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
|
||||
|
||||
# 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\
|
||||
#!/bin/bash -e
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
test -e compiled || mkdir compiled
|
||||
rm -f temp.txt
|
||||
|
||||
for sourcefile in *.sma
|
||||
do
|
||||
amxxfile="`echo $sourcefile | sed -e 's/\.sma$/.amxx/'`"
|
||||
echo -n "Compiling $sourcefile ..."
|
||||
./amxxpc $sourcefile -ocompiled/$amxxfile >> temp.txt
|
||||
echo "done"
|
||||
done
|
||||
|
||||
less temp.txt
|
||||
rm 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
|
||||
do
|
||||
amxxfile="`echo $sourcefile | sed -e 's/\.sma$/\.amxx/'`"
|
||||
echo -e "\nCompiling $sourcefile ..."
|
||||
./amxxpc $sourcefile -ocompiled/$amxxfile
|
||||
done
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user