From 539b4817177e35c6fe470e76b7e74032473e4be3 Mon Sep 17 00:00:00 2001 From: "Jeffrey M. Levesque" Date: Wed, 21 Feb 2018 00:14:02 -0500 Subject: [PATCH] #2935: install_rancher, install 'wget' for 'darwin' --- install_rancher | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/install_rancher b/install_rancher index d4bc961cd..00b1d8e4e 100644 --- a/install_rancher +++ b/install_rancher @@ -24,16 +24,31 @@ case "${CURRENT_DISTRO}" in esac ## download rancher-compose -if [ "$DISTRO_TYPE" = 'unix' ] || [ "$DISTRO_TYPE" = 'linux' ]; then +if [ "$DISTRO_TYPE" = 'unix' ]; then + ## install wget + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + brew install wget + + ## install rancher-compose + tar zxf "$RANCHER_DISTRO"-v${VERSION_NUM}-rc1.tar.gz + rm "$RANCHER_DISTRO"-v${VERSION_NUM}-rc1.tar.gz + sudo mv rancher-compose-v${VERSION_NUM}/rancher-compose /usr/local/bin/rancher-compose + sudo chmod +x /usr/local/bin/rancher-compose + +elif [ "$DISTRO_TYPE" = 'linux' ]; then + DISTRO=$(cat /etc/*-release) + wget "$RANCHER_REPO"/releases/download/v${RANCHER_VERSION}/"$RANCHER_DISTRO"-v${RANCHER_VERSION}-rc1.tar.gz tar zxf "$RANCHER_DISTRO"-v${VERSION_NUM}-rc1.tar.gz rm "$RANCHER_DISTRO"-v${VERSION_NUM}-rc1.tar.gz sudo mv rancher-compose-v${VERSION_NUM}/rancher-compose /usr/local/bin/rancher-compose sudo chmod +x /usr/local/bin/rancher-compose + elif [ "$DISTRO_TYPE" = 'windows' ]; then wget "$RANCHER_REPO"/releases/download/v${RANCHER_VERSION}/"$RANCHER_DISTRO"-v${RANCHER_VERSION}-rc1.zip unzip -j "$RANCHER_DISTRO"-v${VERSION_NUM}-rc1.zip rm "$RANCHER_DISTRO"-v${VERSION_NUM}-rc1.zip + else echo 'Error: distro is not known, contact repository owner.' exit