-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathinstall-aws-cli.sh
More file actions
executable file
·37 lines (32 loc) · 942 Bytes
/
install-aws-cli.sh
File metadata and controls
executable file
·37 lines (32 loc) · 942 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
######################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# SPDX-License-Identifier: MIT-0 #
######################################################################
if [ -e .env ]; then
. .env
elif [ -e ../.env ]; then
pushd ..
. .env
popd
fi
if [ "$OPERATING_SYSTEM" == "Linux" ]; then
echo "Installing aws-cli on Linux ..."
pushd /tmp
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
rm -f awscliv2.zip
rm -rf ./aws
popd
which aws
aws --version
elif [ "$OPERATING_SYSTEM" == "MacOS" ]; then
echo "Installing aws-cli on MacOS ..."
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /
which aws
aws --version
else
echo "Unrecognized OS $OPERATING_SYSTEM"
fi