diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..880938c --- /dev/null +++ b/Makefile @@ -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 + diff --git a/_install.sh b/_install.sh deleted file mode 100755 index 0450174..0000000 --- a/_install.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -#Создан: Пт 26 фев 2016 21:35:10 -#Изменён: Пт 26 фев 2016 21:53:32 - -shopt -s extglob - -for script in !(_install.sh); { - lnbin $script scripts -} -