Skip to content

Instantly share code, notes, and snippets.

@viktorbenei
Last active July 13, 2019 22:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save viktorbenei/8900fefd8338559e4c4ccb34fbcfe37d to your computer and use it in GitHub Desktop.
Save viktorbenei/8900fefd8338559e4c4ccb34fbcfe37d to your computer and use it in GitHub Desktop.
install-bitrise-cli.sh
#!/usr/bin/env bash
set -e
function main {
bitrise_cli_ver="$1"
if [ -z "${bitrise_cli_ver}" ] ; then
echo " [!] No version specified, required! Run this script as: $ bash install-bitrise-cli.sh x.x.x"
exit 1
fi
echo "Installing Bitrise CLI v${bitrise_cli_ver} ..."
set -x
sudocmd=''
if [[ "$(uname)" == "Linux" ]] ; then
sudocmd='sudo'
fi
${sudocmd} wget "https://github.com/bitrise-io/bitrise/releases/download/${bitrise_cli_ver}/bitrise-$(uname -s)-$(uname -m)" -O /usr/local/bin/bitrise
${sudocmd} chmod +x /usr/local/bin/bitrise
/usr/local/bin/bitrise setup
}
#
# === run it ===
#
main "$1"
@viktorbenei
Copy link
Author

viktorbenei commented Feb 10, 2018

Run it via curl + bash one liner:

curl https://gist.githubusercontent.com/viktorbenei/8900fefd8338559e4c4ccb34fbcfe37d/raw/install-bitrise-cli.sh | bash -s x.x.x

replace x.x.x with the version you want to install!

You can find the available versions at: https://github.com/bitrise-io/bitrise/releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment