From 26f91feb60210aca4b6168bbec987fcddeabf236 Mon Sep 17 00:00:00 2001 From: Gary Edgar Date: Fri, 15 Feb 2019 11:35:49 -0800 Subject: [PATCH] Updated README and added OSTYPE check --- README.md | 4 ++-- bin/install_latest.sh | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e7adbeb..0c3e555 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,10 @@ upload to [github](https://github.com/vitessio/vitess/releases) rather than the docker images at [https://github.com/vitessio/vitess/tree/master/docker](https://github.com/vitessio/vitess/tree/master/docker). -## Install Latest Vitess Release +## Install Latest Vitess Release (Linux) The `install_latest.sh` script is a helper to install the latest release from -[github](https://github.com/vitessio/vitess/releases): +[github](https://github.com/vitessio/vitess/releases) on Linux: ``` git clone https://github.com/planetscale/vitess-releases.git diff --git a/bin/install_latest.sh b/bin/install_latest.sh index fb09059..477aee9 100755 --- a/bin/install_latest.sh +++ b/bin/install_latest.sh @@ -9,6 +9,11 @@ # http://redsymbol.net/articles/unofficial-bash-strict-mode/ set -euo pipefail +if [[ $OSTYPE != "linux-gnu" ]]; then + echo "Non-linux OS detected. Exiting." + exit 1 +fi + INSTALL_DIR=${HOME} RELEASE_REPO_URL=https://api.github.com/repos/planetscale/vitess-releases/releases/latest LATEST_RELEASE_URL=$(curl -s ${RELEASE_REPO_URL} | grep "browser_download_url.*gz" | awk -F'"' '{print $4}')