Skip to content

Commit

Permalink
Add aws cli installer
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxattax97 committed Aug 20, 2024
1 parent 12aeee8 commit 792503b
Showing 1 changed file with 27 additions and 6 deletions.
33 changes: 27 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ case "$response" in
# shell-gpt needs python3-devel on Fedora.
# gem needs ruby-devel on Fedora.
sudo dnf install -y \
awscli2 \
btop \
ctags \
curl \
Expand Down Expand Up @@ -200,7 +199,6 @@ case "$response" in
# macOS has outdated version of curl, make, binutils, gcc
# macOS login needs pinentry-mac in order to complete gpg git commit signing
brew install \
awscli \
binutils \
btop \
chezmoi \
Expand Down Expand Up @@ -229,9 +227,7 @@ case "$response" in
xsel \
zsh
elif [[ -x "$(command -v apt)" ]]; then
# NOTE: On slightly older versions of Debian/Ubuntu awscli is v1, not v2!
sudo apt install -y \
awscli \
btop \
ctags \
curl \
Expand Down Expand Up @@ -321,8 +317,6 @@ case "$response" in
weechat \
xsel \
zsh

# TODO: Install awscli v2 on BSD
fi

if [[ ! -x "$(command -v chezmoi)" ]]; then
Expand Down Expand Up @@ -425,6 +419,9 @@ case "$response" in
## Leonidas Spyropoulos
gpg --receive-keys 3572FA2A1B067F22C58AF155F8B821B42A6FDCD7

# AWS CLI Team
gpg --keyserver keyserver.ubuntu.com --receive-keys FB5DB77FD5C118B80511ADA8A6310ACC4672475C


if [[ ! "$SHELL" =~ "zsh" ]]; then
chsh -s "$(command -v zsh)" "${USER}"
Expand All @@ -435,6 +432,30 @@ case "$response" in
;;
esac

read -r -p "Would you like to install AWS CLI (v2)? [y/N] " response
case "$response" in
[yY][eE][sS]|[yY])
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip.sig" -o "awscliv2.sig"

gpg --verify "awscliv2.sig" "awscliv2.zip"
unzip awscliv2.zip

if [ -d "${HOME}/.local/share/aws-cli" ]; then
./aws/install --bin-dir "${HOME}/.local/bin" --install-dir "${HOME}/.local/share/aws-cli" --update
else
./aws/install --bin-dir "${HOME}/.local/bin" --install-dir "${HOME}/.local/share/aws-cli"
fi

rm -rf awscliv2.zip awscliv2.sig aws

aws --version
;;
*)
echo "Skipping AWS CLI installation"
;;
esac

read -r -p "Would you like to add unofficial package repositories? [y/N] " response
case "$response" in
[yY][eE][sS]|[yY])
Expand Down

0 comments on commit 792503b

Please sign in to comment.