2 changed files with 22 additions and 11 deletions
@ -0,0 +1,22 @@ |
|||||||
|
path = ~/.shellrc/bin/scripts
|
||||||
|
|
||||||
|
all: install |
||||||
|
|
||||||
|
mkdir: |
||||||
|
mkdir -p $(path)
|
||||||
|
|
||||||
|
rmdir: |
||||||
|
rmdir $(path) 2>&-; :
|
||||||
|
|
||||||
|
install: mkdir |
||||||
|
find . -type f -executable -exec basename {} \; | while read -r line; do ln -s $$(realpath $$line) $(path)/$$line; done
|
||||||
|
|
||||||
|
rmlinks: |
||||||
|
find . -type f -executable -exec basename {} \; | xargs -IF rm -fv $(path)/F
|
||||||
|
|
||||||
|
uninstall: rmlinks rmdir |
||||||
|
|
||||||
|
clean: uninstall |
||||||
|
|
||||||
|
.PHONY: all mkdir rmdir install uninstall clean |
||||||
|
|
Loading…
Reference in new issue