From 9915503af493a434abf70c1ab232fb5c1e0f5c4d Mon Sep 17 00:00:00 2001 From: Simon Let Date: Sun, 19 May 2019 01:07:04 +0200 Subject: [PATCH] make uninstall --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index f64196f..e046a48 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,7 @@ install: build | $(HOME)/.resh $(HOME)/.resh/bin $(HOME)/.config $(HOME)/.resh/r cp config.toml ~/.config/resh.toml -f cp shellrc.sh ~/.resh/shellrc -f cp resh-* ~/.resh/bin/ -f + [ -f ~/.resh-history.json ] && mv ~/resh-history.json ~/.resh/history.json grep '[[ -f ~/.resh/shellrc ]] && source ~/.resh/shellrc' ~/.bashrc ||\ echo '[[ -f ~/.resh/shellrc ]] && source ~/.resh/shellrc' >> ~/.bashrc grep '[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh' ~/.bashrc ||\ @@ -18,6 +19,10 @@ install: build | $(HOME)/.resh $(HOME)/.resh/bin $(HOME)/.config $(HOME)/.resh/r kill -SIGTERM $$(cat ~/.resh/resh.pid) nohup resh-daemon &>/dev/null & disown +uninstall: + -mv ~/.resh/history.json ~/resh-history.json + -rm -rf ~/.resh + resh-daemon: daemon/resh-daemon.go common/resh-common.go go build -o $@ $<