#!/bin/bash # curl https://ac6932d63852ed25026e205753b59d03a73ef2c7@raw.githubusercontent.com/adminixio/adminix-cli/master/bin/install_adminix | sudo bin/bash if [ -x "$(command -v apt-get)" ]; then echo "Installing required libraries..." apt-get update apt-get install -y ruby-full git-core curl tar build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev gem install bundler elif [ -x "$(command -v brew)" ]; then echo "Installing required libraries..." brew install ruby git curl fi if ! [ -x "$(command -v ruby)" ]; then echo "Error: Ruby is not installed." >&2 exit 1 fi echo "" echo "Getting latest Adminix-CLI source..." cd /tmp #rm -rf adminixio-adminix-cli-* rm -rf adminix-cli #curl -L https://ac6932d63852ed25026e205753b59d03a73ef2c7@api.github.com/repos/adminixio/adminix-cli/tarball | tar zx git clone https://ac6932d63852ed25026e205753b59d03a73ef2c7:x-oauth-basic@github.com/adminixio/adminix-cli.git #cd adminixio-adminix-cli-* cd adminix-cli echo "" echo "Installing Adminix-CLI..." bundle install gem build adminix.gemspec gem install adminix-* echo "" echo "Latest Adminix-CLI has been installed" adminix version echo "" adminix help