From c1169887d54c2cac7098d071d9b1daf750c620b4 Mon Sep 17 00:00:00 2001 From: Maxim Likhachev Date: Sun, 20 Oct 2019 01:01:04 +0500 Subject: [PATCH] Added Makefile --- Makefile | 22 ++++++++++++++++++++++ _install.sh | 11 ----------- 2 files changed, 22 insertions(+), 11 deletions(-) create mode 100644 Makefile delete mode 100755 _install.sh 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 -} -