Skip to content

Instantly share code, notes, and snippets.

@incanus
Created December 6, 2011 19:56
Show Gist options
  • Save incanus/1439684 to your computer and use it in GitHub Desktop.
Save incanus/1439684 to your computer and use it in GitHub Desktop.
Script to export Heroku environment variables to the local shell
#!/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
@misteryomi
Copy link

@TahaBoulehmi Works perfect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment