Created
December 6, 2011 19:56
-
-
Save incanus/1439684 to your computer and use it in GitHub Desktop.
Script to export Heroku environment variables to the local shell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
for x in `heroku config`; do | |
if [[ $x == HUBOT* ]]; then | |
name=$x | |
elif [ $x != '=>' ]; then | |
value=$x | |
export $name=$value | |
fi | |
done | |
echo | |
echo "Heroku config exported to environment:" | |
echo | |
printenv | grep HUBOT | |
echo |
I wrote this JavaScript code. This could be useful for those who would like to download the .env file from heroku's website.
https://gist.github.com/TahaBoulehmi/ef9e8f9123e53590bdefc050c6b568ba
@TahaBoulehmi Works perfect!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
easy enough to just do the following one liner: