Created
December 6, 2022 20:46
-
-
Save danieljurek/a86f7192fb1b8bf50c29d87303e61c56 to your computer and use it in GitHub Desktop.
Install az CLI on Linux ARM64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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