HOST=178.63.97.203 PORT=51010 SERVERPATH=/srv/www/illy.bz/http/fi/7dtd/ VERSIONFILE=../bin/7DaysToDie_Data/Managed/7dtd-server-fixes_version.txt VERSION=$(shell cat ${VERSIONFILE} | grep "Version" | cut -d\ -f8) ARCHIVENAME=server_fixes_v${VERSION}.tar.gz build: CONTENTS ${ARCHIVENAME} @echo Bundle built successfully all: build upload @echo Bundle built and uploaded upload: ${ARCHIVENAME} @echo Uploading files... @scp -P ${PORT} ${ARCHIVENAME} ${VERSIONFILE} ${HOST}:${SERVERPATH} @ssh -p ${PORT} ${HOST} "cd ${SERVERPATH}; rm -f server_fixes.tar.gz; ln -s ${ARCHIVENAME} server_fixes.tar.gz" ${ARCHIVENAME}: CONTENTS @echo Creating archive... @tar -czf ${ARCHIVENAME} 7DaysToDie_Data Mods CONTENTS: SERVERFIXES SERVERFIXES: @echo Copying server fixes... @mkdir -p 7DaysToDie_Data/Managed @cp ../bin/7DaysToDie_Data/Managed/Assembly-CSharp.patched.dll 7DaysToDie_Data/Managed/Assembly-CSharp.dll @cp ../bin/7DaysToDie_Data/Managed/7dtd-server-fixes.dll 7DaysToDie_Data/Managed/ @cp ../bin/7DaysToDie_Data/Managed/7dtd-server-fixes_version.txt 7DaysToDie_Data/Managed/ @mkdir -p Mods @cp ../bin/Mods/* Mods/ -R @mkdir -p Mods/AllocsWebInterface/webserver @cp ../webserver/* Mods/AllocsWebInterface/webserver/ -R @find . -name "*~" -exec rm {} \; clean: @echo Cleaning intermediate stuff... @rm -Rf 7DaysToDie_Data Mods server_fixes_v*.tar.gz