Skip to content

Commit

Permalink
Create azure_cli_bak_setup
Browse files Browse the repository at this point in the history
  • Loading branch information
joy-joel authored Sep 27, 2023
1 parent 01160f4 commit c5f4322
Showing 1 changed file with 72 additions and 0 deletions.
72 changes: 72 additions & 0 deletions azure_cli_bak_setup
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

0 comments on commit c5f4322

Please sign in to comment.