HOST=178.63.97.203 PORT=51010 SERVERPATH=/srv/www/illy.bz/http/fi/7dtd/ VERSIONFILE=../bin/Mods/Allocs_CommonFunc/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... @rm 7DaysToDie_Data -R @rm Mods -R @mkdir -p 7DaysToDie_Data/Managed @cp ../7dtd-binaries/Assembly-CSharp.dll 7DaysToDie_Data/Managed/Assembly-CSharp.dll @mkdir -p Mods @cp ../bin/Mods/* Mods/ -R @mkdir -p Mods/Allocs_WebAndMapRendering/webserver @cp ../webserver/* Mods/Allocs_WebAndMapRendering/webserver/ -R @rm Mods/Allocs_WebAndMapRendering/webserver/protect -f @find . -name "*~" -exec rm {} \; clean: @echo Cleaning intermediate stuff... @rm -Rf 7DaysToDie_Data Mods server_fixes_v*.tar.gz