Skip to content

Commit

Permalink
Updated saml2aws/install-saml2aws.sh (#504)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyhau authored Nov 11, 2023
1 parent 704c9e2 commit 36119c0
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions saml2aws/install-saml2aws.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,20 @@ else
fi

if [ "${VERSION}" != "${CURR_VERSION}" ]; then
ZIP_FILE="https://github.com/Versent/saml2aws/releases/download/v${VERSION}/saml2aws_${VERSION}_linux_amd64.tar.gz"

echo "INFO: Downloading saml2aws"
cd /tmp
[ -f ${ZIP_FILE} ] || wget ${ZIP_FILE} -q --no-check-certificate
tar xfz saml2aws_${VERSION}_linux_amd64.tar.gz
rm saml2aws_${VERSION}_linux_amd64.tar.*
cd - 1> /dev/null
FILE_NAME=saml2aws_${VERSION}_linux_amd64.tar.gz
FILE_URL="https://github.com/Versent/saml2aws/releases/download/v${VERSION}/${FILE_NAME}"
WORK_DIR=/tmp/tmp_workdir

wget ${FILE_URL} -O /tmp/${FILE_NAME} --no-check-certificate -q
mkdir -p ${WORK_DIR}
tar xfz /tmp/${FILE_NAME} -C ${WORK_DIR}

echo "INFO: Installing to ${HOME}/.local/bin/"
mkdir -p ${HOME}/.local/bin
mv /tmp/saml2aws ${HOME}/.local/bin/
mv ${WORK_DIR}/saml2aws ${HOME}/.local/bin/

rm -rf ${WORK_DIR}

echo "INFO: saml2aws installed: $(saml2aws --version 2>&1)"

Expand Down

0 comments on commit 36119c0

Please sign in to comment.