os := $(shell basename $$PWD) short := $(shell echo "$(os)" | head -c 3) ifeq ($(os),freebsd) short := freebsd endif ifeq ($(os),linux) short := linux endif ifeq ($(os),fedora) short := rpm endif pull-from-maker: wget --no-parent -4 -r -R 'txt' -A 'zip,gz' --cut-dirs=5 -nH http://maker2.bytemark.co.uk/archives/bytemark-client-packages/lastSuccessfulBuild/$(short)/build rm -f robots.txt build bytemark-latest.tar.gz bytemark-latest.zip LATEST=`ls . | grep -v latest | grep 'bytemark-[[:digit:]]' | tail -n 1`; \ if [ "$${LATEST##*.}" = "zip" ] ; then \ ln -s $$LATEST bytemark-latest.zip; \ else \ ln -s $$LATEST bytemark-latest.tar.gz; \ fi clean: verify: .PHONY: clean verify pull-from-maker