-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
72 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#!/bin/bash | ||
|
||
# Install Azure CLI (user-level installation) | ||
|
||
# Main function | ||
main() { | ||
install_azure_cli | ||
} | ||
|
||
# Get Device 32-bit/64-bit | ||
device_64_bit() { | ||
cpu=$(uname -m) | ||
if [[ $cpu == *"64"* ]]; then | ||
return 0 | ||
elif [[ $cpu == *"armv7"* ]]; then | ||
return 1 | ||
else | ||
return 0 | ||
fi | ||
} | ||
|
||
# Download and Install Azure CLI | ||
install_azure_cli() { | ||
device_64_bit | ||
bit64=$? | ||
if [ $bit64 -eq 0 ]; then | ||
curl -sL "https://aka.ms/InstallAzureCLIDeb" | bash | ||
else | ||
curl -sL "https://aka.ms/InstallAzureCLIDeb" | bash | ||
fi | ||
} | ||
|
||
# Main App | ||
main | ||
|
||
|
||
|
||
|
||
# EDIT OR REMOVE THIS LATER | ||
|
||
# it must be executed with admin privileges, i.e. with `sudo`. | ||
|
||
# Main function | ||
# main() { | ||
# install_azure_cli | ||
# } | ||
|
||
# # Get Device 32-bit/64-bit | ||
# device_64_bit() { | ||
# cpu=$(uname -m) | ||
# if [[ $cpu == *"64"* ]]; then | ||
# return 0 | ||
# elif [[ $cpu == *"armv7"* ]]; then | ||
# return 1 | ||
# else | ||
# return 0 | ||
# fi | ||
# } | ||
|
||
# # Download and Install Azure CLI | ||
# install_azure_cli() { | ||
# device_64_bit | ||
# bit64=$? | ||
# if [ $bit64 -eq 0 ]; then | ||
# curl -sL "https://aka.ms/InstallAzureCLIDeb" | sudo bash | ||
# else | ||
# curl -sL "https://aka.ms/InstallAzureCLIDeb" | sudo bash | ||
# fi | ||
# } | ||
|
||
# # Main App | ||
# main |