Skip to content

Instantly share code, notes, and snippets.

@danieljurek
Created December 6, 2022 20:46
Show Gist options
  • Save danieljurek/a86f7192fb1b8bf50c29d87303e61c56 to your computer and use it in GitHub Desktop.
Save danieljurek/a86f7192fb1b8bf50c29d87303e61c56 to your computer and use it in GitHub Desktop.
Install az CLI on Linux ARM64
#!/usr/bin/env bash
# Stop script on non-zero exit code
set -e
# Stop script if unbound variable found (use ${var:-} if intentional)
set -u
set pipefail
temp_dir=$(mktemp -d /tmp/tool-preinstall-XXXXXXXX)
sudo apt update
sudo apt install -y software-properties-common curl
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt update
sudo apt install -y gcc python3 python3-distutils python3-dev
python3 --version
curl -L https://azurecliprod.blob.core.windows.net/install.py -o $temp_dir/install-az.py
printf "\n\n" | python3 $temp_dir/install-az.py
# In Azure DevOps, prepend to PATH: echo "##vso[task.prependpath]/$HOME/bin"
echo "az installed"
"$HOME/bin/az" version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment