Skip to content

Instantly share code, notes, and snippets.

@fgassert
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fgassert/8928302 to your computer and use it in GitHub Desktop.
Save fgassert/8928302 to your computer and use it in GitHub Desktop.
#!/bin/bash
echo '[default]' > .s3cfg
if [ -n "$ACCESS_KEY" ] && [ -n "$SECRET_KEY" ] ; then
echo access_key=$ACCESS_KEY >> .s3cfg
echo secret_key=$SECRET_KEY >> .s3cfg
else
echo access_key=$AWS_ACCESS_KEY_ID >> .s3cfg
echo secret_key=$AWS_SECRET_ACCESS_KEY >> .s3cfg
echo access_token=$AWS_SECURITY_TOKEN >> .s3cfg
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment