Updating install.sh

This commit is contained in:
João M. Bezerra 2021-05-30 23:38:32 -03:00
parent 62a4fe695d
commit f952392c34

View File

@ -7,29 +7,30 @@ DOWNLOAD_LOCATION="/tmp/ouch"
INSTALLATION_LOCATION="/usr/bin/ouch"
REPO_URL="https://github.com/vrmiguel/ouch"
# Panicks script if anything fails
set -e
abort() {
echo "error occurred, aborting." ; exit 1
}
# Panicks script if anything fails
set -e
install() {
echo "Ouch v$VERSION."
printf "Detected system: "
# System detection from https://stackoverflow.com/a/27776822/9982477
# Go there to see a full table of what `uname -s` might output
case "$(uname -s)" in
Darwin)
system_suffix="-macOS"
echo "Mac OS X."
;;
Linux)
echo "Linux."
system_suffix="-ubuntu-18.04-glibc"
;;
Darwin)
echo "Mac OS X."
system_suffix="-macOS"
;;
CYGWIN*|MINGW32*|MSYS*|MINGW*)
echo "Windows."
system_suffix=".exe"
@ -76,3 +77,6 @@ echo ""
echo "Successfully installed!"
echo "See $REPO_URL for usage instructions."
}
install