@@ -8,10 +8,10 @@ ARCHITECTURE="${ARCHITECTURE}"
88VERIFY_SIGNATURE=" ${VERIFY_SIGNATURE} "
99
1010# Check if AWS CLI is already installed
11- if command -v aws > /dev/null 2>&1 ; then
11+ if command -v aws > /dev/null 2>&1 ; then
1212 INSTALLED_VERSION=$( aws --version 2>&1 | awk ' {print $1}' | cut -d' /' -f2)
1313 echo " ℹ️ AWS CLI is already installed (version $INSTALLED_VERSION )"
14-
14+
1515 # If a specific version was requested, check if it matches
1616 if [ -n " $VERSION " ] && [ " $INSTALLED_VERSION " != " $VERSION " ]; then
1717 echo " ⚠️ Installed version ($INSTALLED_VERSION ) does not match requested version ($VERSION )"
6767# Verify signature if requested
6868if [ " $VERIFY_SIGNATURE " = " true" ]; then
6969 echo " 🔐 Verifying GPG signature..."
70-
70+
7171 # Download signature file
7272 curl -fsSL " $DOWNLOAD_URL .sig" -o " awscliv2.zip.sig"
73-
73+
7474 # Download and import AWS CLI public key
7575 cat > awscli-public-key.asc << 'EOF '
7676-----BEGIN PGP PUBLIC KEY BLOCK-----
@@ -127,10 +127,10 @@ qJZLqJZJqJZLqJZJqJZLqJZJqA==
127127=qvqC
128128-----END PGP PUBLIC KEY BLOCK-----
129129EOF
130-
131- gpg --import awscli-public-key.asc 2> /dev/null || true
132-
133- if gpg --verify awscliv2.zip.sig awscliv2.zip 2> /dev/null; then
130+
131+ gpg --import awscli-public-key.asc 2> /dev/null || true
132+
133+ if gpg --verify awscliv2.zip.sig awscliv2.zip 2> /dev/null; then
134134 echo " ✅ Signature verification successful"
135135 else
136136 echo " ⚠️ Signature verification failed, but continuing installation..."
152152fi
153153
154154# Verify installation
155- if command -v aws > /dev/null 2>&1 ; then
155+ if command -v aws > /dev/null 2>&1 ; then
156156 INSTALLED_VERSION=$( aws --version 2>&1 | awk ' {print $1}' | cut -d' /' -f2)
157157 echo " ✅ AWS CLI successfully installed (version $INSTALLED_VERSION )"
158158 aws --version
0 commit comments