about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2019-03-16T23·54+0000
committerWilliam Carroll <wpcarro@gmail.com>2019-03-16T23·54+0000
commit2a70fdf5c2cb7012e5102dd3a3dd2ad23123dea7 (patch)
tree1bcc0a646b0d292e4b0d22d921e921ac10ed7edd
parent44e46bbce2bd94ff6c9379152696619186ae248d (diff)
Support uninstall; setup -> install
- support uninstall in Makefile
- change setup script name to install
-rw-r--r--Makefile5
-rwxr-xr-xconfigs/install (renamed from configs/setup)0
-rw-r--r--configs/uninstall11
3 files changed, 15 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 999fc266d931..088202925089 100644
--- a/Makefile
+++ b/Makefile
@@ -1,2 +1,5 @@
 install:
-	source "${DOTFILES}/configs/setup"
+	source "${DOTFILES}/configs/install"
+
+uninstall:
+	source "${DOTFILES}/configs/uninstall"
diff --git a/configs/setup b/configs/install
index 0e0ba9290af2..0e0ba9290af2 100755
--- a/configs/setup
+++ b/configs/install
diff --git a/configs/uninstall b/configs/uninstall
new file mode 100644
index 000000000000..547d01280951
--- /dev/null
+++ b/configs/uninstall
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+
+configs="$DOTFILES/configs"
+
+if [[  $(uname) == 'Darwin' ]]; then
+  (cd "$configs/os_x" && stow --delete --target="$HOME" *)
+elif [[ $(uname) == 'Linux' ]]; then
+  (cd "$configs/linux" && stow --delete --target="$HOME" *)
+fi
+
+(cd "$configs/shared" && stow --delete --target="$HOME" *)