Skip to content

Commit

Permalink
build(awscli): install groff and less
Browse files Browse the repository at this point in the history
These tools are needed when using commands like help
  • Loading branch information
mloberg committed Jan 3, 2025
1 parent 93ef21d commit 1f52090
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions scripts/awscli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,18 @@ command -v curl >/dev/null || missing="${missing} curl"
command -v unzip >/dev/null || missing="${missing} unzip"
test -d /etc/ssl/certs || missing="${missing} ca-certificates"

if [ "$missing" != "" ]; then
apt-get update -qq
# shellcheck disable=SC2086
apt-get install --yes --no-install-recommends $missing
fi
apt-get update -qq
# shellcheck disable=SC2086
apt-get install --yes --no-install-recommends $missing less groff

curl -s "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m)-${AWSCLI_VERSION}.zip" -o /tmp/awscliv2.zip
unzip -q -d /tmp /tmp/awscliv2.zip
/tmp/aws/install "$@"
rm -rf /tmp/aws /tmp/awscliv2 /tmp/awscliv2.zip

if [ "$missing" != "" ]; then
# shellcheck disable=SC2086
apt-get remove --yes $missing
apt-get clean
apt-get autoclean
apt-get autoremove --yes --purge
rm -rf /var/lib/apt/lists /var/cache/apt/archives /usr/share/doc /root/.cache/
fi
# shellcheck disable=SC2086
[ -z "$missing" ] || apt-get remove --yes $missing
apt-get clean
apt-get autoclean
apt-get autoremove --yes --purge
rm -rf /var/lib/apt/lists /var/cache/apt/archives /usr/share/doc /root/.cache/

0 comments on commit 1f52090

Please sign in to comment.