code / scripts

Lines748 Shell528 Python72 Lua67 Bourne Again Shell62 make15
1 others 4
Markdown4
(20 lines)
1 PREFIX=$(HOME)/.local
3 EXECUTABLES := $(shell find . -maxdepth 1 -type f -executable -printf "%f\n")
5 all:
6 @echo Nothing to make.
8 install: $(EXECUTABLES)
9 @if ! echo "$$PATH" | tr ':' '\n' | grep -qx "$(PREFIX)/bin"; then \
10 echo "$(PREFIX)/bin is not in your "'$$PATH'" variable"; \
11 exit 1; \
12 fi
13 echo cp $(EXECUTABLES) $(PREFIX)/bin
15 uninstall:
16 @for f in $(EXECUTABLES); do \
17 rm -v "$(PREFIX)/bin/$$f"; \
18 done
20 .PHONY: all install uninstall