Skip to content

Commit

Permalink
Update azure_cli_setup
Browse files Browse the repository at this point in the history
  • Loading branch information
themobileprof authored Sep 29, 2023
1 parent e327a63 commit d02478b
Showing 1 changed file with 36 additions and 18 deletions.
54 changes: 36 additions & 18 deletions azure_cli_setup
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

# Install Azure CLI (user-level installation)


# Constants ########
readonly WAITLONG=3
readonly WAITSMALL=1
####################

install()
{
sleep $WAITLONG
pkg install -y $1
}


# Main function
main() {
install_azure_cli
Expand All @@ -21,26 +34,31 @@ main() {

# Download and Install Azure CLI
install_azure_cli() {

apt-get install -q libffi
pip install --user virtualenv

cat << EOF > ~/.bashrc
PATH=$PATH:~/.local/bin
export PATH
EOF

source ~/.bashrc
virtualenv ~/.local/lib/azure-cli
cd ~/.local/lib/azure-cli
source ./bin/activate

pip install cffi
pip install azure-cli

pip freeze > requirements.txt
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python get-pip.py
install binutils

apt-get update -fq &&
\apt-get install -q openssl libffi make &&
\apt-get install -q openssh &&
\pip install --user virtualenv

cat << EOF > ~/.bashrc
PATH=$PATH:~/.local/bin
export PATH
EOF
source ~/.bashrc
virtualenv ~/.local/lib/azure-cli
cd ~/.local/lib/azure-cli
source ./bin/activate
pip install cffi
pip install azure-cli
pip freeze > requirements.txt
}
# Main App
main
Expand Down

0 comments on commit d02478b

Please sign in to comment.