Makefile (866B)
1 REQUIRED_BINS := gpg 2 $(foreach bin,$(REQUIRED_BINS),\ 3 $(if $(shell command -v $(bin) 2> /dev/null),$(info Found `$(bin)`),$(error Missing Dep. Please install `$(bin)`))) 4 5 .PHONY: install uninstall 6 7 install: 8 install -D -m755 diary-add /usr/local/bin/diary-add 9 install -D -m755 diary-add-hidden /usr/local/bin/diary-add-hidden 10 install -D -m755 diary-edit /usr/local/bin/diary-edit 11 install -D -m755 diary-list /usr/local/bin/diary-list 12 install -D -m755 diary-new /usr/local/bin/diary-new 13 install -D -m755 diary-print /usr/local/bin/diary-print 14 install -D -m755 diary-read-all /usr/local/bin/diary-read-all 15 16 uninstall: 17 rm -f /usr/local/bin/diary-add 18 rm -f /usr/local/bin/diary-add-hidden 19 rm -f /usr/local/bin/diary-edit 20 rm -f /usr/local/bin/diary-list 21 rm -f /usr/local/bin/diary-new 22 rm -f /usr/local/bin/diary-print 23 rm -f /usr/local/bin/diary-read-all