make uninstall

pull/3/head
Simon Let 7 years ago
parent 18df681542
commit 9915503af4
  1. 5
      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 config.toml ~/.config/resh.toml -f
cp shellrc.sh ~/.resh/shellrc -f cp shellrc.sh ~/.resh/shellrc -f
cp resh-* ~/.resh/bin/ -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 ||\ grep '[[ -f ~/.resh/shellrc ]] && source ~/.resh/shellrc' ~/.bashrc ||\
echo '[[ -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 ||\ 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) kill -SIGTERM $$(cat ~/.resh/resh.pid)
nohup resh-daemon &>/dev/null & disown 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 resh-daemon: daemon/resh-daemon.go common/resh-common.go
go build -o $@ $< go build -o $@ $<

Loading…
Cancel
Save