Skip to content

Commit

Permalink
#2935: install_rancher, install 'wget' for 'darwin'
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff1evesque committed Feb 21, 2018
1 parent f078225 commit 539b481
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion install_rancher
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 539b481

Please sign in to comment.