From d0956b87a5cf2a2cdf01c7f991aadedfe1a6ed55 Mon Sep 17 00:00:00 2001 From: Simon Let Date: Fri, 24 May 2019 12:59:41 +0200 Subject: [PATCH] install improvements --- Makefile | 2 ++ install_helper.sh | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/Makefile b/Makefile index 882ebac..9ca0d17 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,8 @@ install: build | $(HOME)/.resh $(HOME)/.resh/bin $(HOME)/.config $(HOME)/.resh/r # Restarting resh daemon ... [ ! -f ~/.resh/resh.pid ] || kill -SIGTERM $$(cat ~/.resh/resh.pid) nohup resh-daemon &>/dev/null & disown + # Final touch + touch ~/.resh_history.json # ########################################################## # # diff --git a/install_helper.sh b/install_helper.sh index d416a1f..eddd084 100755 --- a/install_helper.sh +++ b/install_helper.sh @@ -1,7 +1,24 @@ #!/usr/bin/env bash if ! go version &>/dev/null; then + echo echo "Please INSTALL GOLANG and run this again" + echo + if [ "$(uname)" = "Darwin" ]; then + echo 'You can probably use `brew install go`.' + exit 1 + elif [ "$(uname)" = "Linux" ]; then + . /etc/os-release + if [ "${ID}" = "ubuntu" ]; then + echo 'You can probably use `sudo snap install go --classic` (gets latest golang - RECOMMENDED)' + echo 'OR `sudo apt install go` (this might give you old golang)' + exit 1 + elif [ "${ID_LIKE}" = "debian" ]; then + echo 'You can probably use `sudo apt install go`' + exit 1 + fi + fi + echo "It's recomended to use your favourite package manager." exit 1 fi