From 2a70fdf5c2cb7012e5102dd3a3dd2ad23123dea7 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Sat, 16 Mar 2019 23:54:58 +0000 Subject: [PATCH] Support uninstall; setup -> install - support uninstall in Makefile - change setup script name to install --- Makefile | 5 ++++- configs/{setup => install} | 0 configs/uninstall | 11 +++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) rename configs/{setup => install} (100%) create mode 100644 configs/uninstall diff --git a/Makefile b/Makefile index 999fc266d..088202925 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 similarity index 100% rename from configs/setup rename to configs/install diff --git a/configs/uninstall b/configs/uninstall new file mode 100644 index 000000000..547d01280 --- /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" *)