From 7b45e3557c0e2b50ee95cd9f30efe18f6496b9b3 Mon Sep 17 00:00:00 2001 From: Maxim Likhachev Date: Sat, 13 Jun 2020 19:16:13 +0300 Subject: [PATCH] Improve Makefile --- Makefile | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index fb0e1b3..daae2c6 100644 --- a/Makefile +++ b/Makefile @@ -10,10 +10,23 @@ rmdir: @rmdir $(path) 2>&-; : install: mkdir - @$(find) . -maxdepth 1 -type f -executable -exec basename {} \; | while read -r line; do ln -vs $$(realpath -- $$line) $(path)/$$line 2>&-; done; true - -rmlinks: - @$(find) . -maxdepth 1 -type f -executable -exec basename {} \; | xargs -IF rm -fv $(path)/F + @$(find) . \ + -maxdepth 1 \ + -type f \ + -executable \ + -exec basename {} \; \ + | while read -r line; do \ + ln -s $$(realpath -- $$line) $(path)/$$line 2>&-; \ + done; \ + true + +rmlinks: + @$(find) . \ + -maxdepth 1 \ + -type f \ + -executable \ + -exec basename {} \; \ + | xargs -IF rm -fv $(path)/F uninstall: rmlinks rmdir