Skip to content

Commit

Permalink
fix script
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Apr 1, 2021
1 parent a44c9db commit cc251df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions iam-saml/bin/external_get-saml-metadata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
#set -e
eval "$(jq -r '@sh "AWS_ENVIRONMENT=\(.aws_environment) OUTPUT=\(.output_file) URL_PREFIX=\(.url_prefix)"')"

if [ -z $AWS_ENVIRONMENT ]
if [[ -z $AWS_ENVIRONMENT ]] || [[ "$AWS_ENVIRONMENT" == "null" ]]
then
AWS_ENVIRONMENT="east-west"
fi

if [ -z $URL_PREFIX ]
if [[ -z "$URL_PREFIX" ]] || [[ "$URL_PREFIX" == "null" ]]
then
URL_PREFIX="https://id-provider.tco.census.gov/nidp/saml2/metadata?PID="
fi
Expand All @@ -28,7 +28,7 @@ then
exit 1
fi

if [ -z $OUTPUT ]
if [[ -z "$OUTPUT" ]] || [[ "$OUTPUT" == "null" ]]
then
OUTPUT="metadata.$(date +%s).xml"
fi
Expand Down

0 comments on commit cc251df

Please sign in to comment.