Files
o3de/scripts/build/build_node/Platform/Linux/install-ubuntu-awscli.sh
T
Steve Pham 38261d0800 Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
2021-07-16 15:25:48 -07:00

45 lines
907 B
Bash
Executable File

#!/bin/bash
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
# This script must be run as root
if [[ $EUID -ne 0 ]]
then
echo "This script must be run as root (sudo)"
exit 1
fi
#
# Install curl if its not installed
#
curl --version >/dev/null 2>&1
if [ $? -ne 0 ]
then
echo "Installing curl"
apt-get install curl -y
fi
#
# Setup AWS CLI if needed
#
aws --version >/dev/null 2>&1
if [ $? -ne 0 ]
then
echo Setting up AWS CLI
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
./aws/install
rm -rf ./aws
else
AWS_CLI_VERSION=$(aws --version | awk '{print $1}' | awk -F/ '{print $2}')
echo AWS CLI \(version $AWS_CLI_VERSION\) already installed
fi