From c0f45c886978a289c3a92d130a35807628b6a419 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 3 Jan 2019 21:35:39 -0800 Subject: [PATCH] Added uninstall. --- Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Makefile b/Makefile index 13e282a..128d8df 100644 --- a/Makefile +++ b/Makefile @@ -23,3 +23,14 @@ install: ascii mkdir -pv $$prefix/bin $$prefix/share/man/man1 \ && cp -v ascii $$prefix/bin/ \ && cp -v doc/ascii.1 $$prefix/share/man/man1/ + +uninstall: + @prefix="$(PREFIX)"; \ + if [[ ! $$prefix ]]; then \ + read -p $$'\033[1mWhere do you want to uninstall from? (default: /usr/local) \033[0m' prefix; \ + fi; \ + if [[ ! $$prefix ]]; then \ + prefix="/usr/local"; \ + fi; \ + echo "Deleting..."; \ + rm -rvf $$prefix/bin/ascii $$prefix/share/man/man1/ascii.1