Added example scripts missing from last commit (NPOTB).
3 # Do not run this file directly. It is meant to be called by other scripts
5 SM_PATH=/home/gdc/sourcemod-central
7 ENGINE_BIN=${ENGINE_PATH}/bin/engine
8 GAME_BIN=${ENGINE_PATH}/${GAME_DIR}/bin/server
9 STEAMINF=${ENGINE_PATH}/${GAME_DIR}/steam.inf
11 if [ $MOD == 1 ] ; then
15 echo -e "Checking game ${GAME_DIR}...\n"
17 if [ $MOD == 0 ] && [ "$1" == "auto" ] ; then
18 ./updatecheck.pl "${STEAMINF}"
19 if [ $? -ne 0 ] ; then
21 elif [ ! -e ${STEAMINF}.new ] ; then
22 echo -e "Update (maybe) available but no steam.inf.new written!\n"
26 export RDTSC_FREQUENCY="disabled"
27 export LD_LIBRARY_PATH=".:${ENGINE_PATH}/bin:$LD_LIBRARY_PATH"
30 if [ "$1" == "update" ] ; then
32 elif [ "$1" == "auto" ] ; then
36 if [ ${UPDATE} -eq 1 ] ; then
39 if [ $MOD == 0 ] ; then
40 #workaround for DD1 "bug" (won't redownload file of same name/size)
42 mv ${STEAMINF} ${STEAMINF}.old
47 mono DepotDownloader.exe \
50 -filelist server.txt \
55 elif [ $i == 5 ] ; then
56 echo -e "Update failed five times; giving up �\(�_�)/�\n"
60 echo -e "Update failed. Trying again in 30 seconds...\n"
65 if [ "$1" == "auto" ] ; then
66 DOWNLOADED_VER=`grep -E "^(Patch)?Version=(([0-9]\.?)+)" ${STEAMINF} | grep -Eo "([0-9]\.?)+" | sed s/[^0-9]//g`
67 EXPECTED_VER=`cat ${STEAMINF}.new`
69 if [ ${DOWNLOADED_VER} != ${EXPECTED_VER} ] ; then
70 echo -e "Download resulted with version ${DOWNLOADED_VER}, but expected ${EXPECTED_VER}. Exiting.\n"
76 cd ${SM_PATH}/tools/gdc-psyfork
80 for i in "${gamedata_files[@]}"
85 -f ${SM_PATH}/gamedata/$i \
86 -b ${GAME_BIN}${BIN_EXT}.so \
87 -x ${ENGINE_BIN}${BIN_EXT}.so \
90 echo -e "------------------------------------------------------\n"
94 if [ ! -e ${STEAMINF} ] ; then
95 mv ${STEAMINF}.old ${STEAMINF}
98 if [ "$1" == "auto" ] && [ -e ${STEAMINF}.new ] ; then