2
0
mirror of https://github.com/alliedmodders/amxmodx.git synced 2025-04-16 06:22:31 +03:00
Dominik Adrian Grzywak ea3f09f105
Let 'compile.sh' compile just a single selected file, instead of compiling the whole directory
Bring changes from SourceMod's "compile.sh"
2024-11-14 15:39:51 +01:00

35 lines
763 B
Bash
Executable File

#!/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
rm -f temp.txt
if [[ $# -ne 0 ]]; then
for sourcefile in "$@"
do
amxxfile="`echo $sourcefile | sed -e 's/\.sma$/.amxx/'`"
echo -n "Compiling $sourcefile ..."
./amxxpc $sourcefile -ocompiled/$amxxfile >> temp.txt
echo "done"
done
else
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
fi
less temp.txt
rm temp.txt