diff --git a/Repositories/Misc/Makefile b/Repositories/Misc/Makefile new file mode 100755 index 0000000..9420393 --- /dev/null +++ b/Repositories/Misc/Makefile @@ -0,0 +1,24 @@ +SHELL=/bin/sh + +EPRINTS:=/usr/local/eprints + +SRC_FILES:=$(shell find . -name "*_local") +DST_FILES:=$(subst ./,$(EPRINTS)/,$(SRC_FILES)) + +.PHONY: deploy + + +deploy: $(DST_FILES) + @announce "Correcting ownership and permissions..." + sudo chown www:www $(DST_FILES) + sudo chmod 755 $(DST_FILES) + +$(EPRINTS)/%: ./% + @announce "Copying $<..." + sudo cp $< $@ + + +debug: + @echo "EPRINTS = [$(EPRINTS)]" + @echo "SRC_FILES = [$(SRC_FILES)]" + @echo "DST_FILES = [$(DST_FILES)]"