From 2b7128905fc115e1d5da1ae9e4dc9d82b80813eb Mon Sep 17 00:00:00 2001 From: blockiv Date: Wed, 23 Mar 2022 20:05:24 -0400 Subject: Add Makefile to simplify installation and removal process. Updated README to show usage --- Makefile | 12 ++++++++++++ README.md | 8 ++++---- 2 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7a2cc86 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +clean: + rm -rf /opt/shell-color-scripts + +install: clean + mkdir -p /opt/shell-color-scripts/colorscripts + cp -rf colorscripts/* /opt/shell-color-scripts/colorscripts + cp colorscript.sh /usr/local/bin/colorscript + +uninstall: + rm -rf /opt/shell-color-scripts + rm -f /usr/local/bin/colorscript + diff --git a/README.md b/README.md index aeac88e..f6f83e7 100644 --- a/README.md +++ b/README.md @@ -25,10 +25,10 @@ Download the source code from this repository or use a git clone: git clone https://gitlab.com/dwt1/shell-color-scripts.git cd shell-color-scripts - rm -rf /opt/shell-color-scripts || return 1 - sudo mkdir -p /opt/shell-color-scripts/colorscripts || return 1 - sudo cp -rf colorscripts/* /opt/shell-color-scripts/colorscripts - sudo cp colorscript.sh /usr/bin/colorscript + sudo make install + + # Removal + sudo make uninstall # optional for zsh completion sudo cp zsh_completion/_colorscript /usr/share/zsh/site-functions -- cgit v1.3-2-g11bf