Skip to content

Commit

Permalink
Separate the heroku env slurping into a separate script and simplify …
Browse files Browse the repository at this point in the history
…it considerably.
  • Loading branch information
seancribbs committed Mar 7, 2012
1 parent a04ae2b commit 04deccf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
13 changes: 1 addition & 12 deletions bin/hubot
@@ -1,17 +1,6 @@
#!/bin/sh

#/usr/bin/env npm install
/usr/bin/env npm install
export PATH="node_modules/.bin:node_modules/hubot/node_modules/.bin:$PATH"

echo "#!/bin/sh" > bin/env.sh
exec heroku config --app bashubot |
while read line; do
if [[ $line != PATH* && $line != REDISTOGO_URL* ]]
then
echo "export ${line/ *=> /=\"}\"" >> bin/env.sh;
fi

done
chmod +x bin/env.sh
source bin/env.sh
exec node_modules/.bin/hubot -n bashobot "$@"
3 changes: 3 additions & 0 deletions bin/hubot-dev
@@ -0,0 +1,3 @@
#!/bin/sh

/usr/bin/env `heroku config --app bashubot | grep -v REDIS | awk '{print $1 "=" $3}'` bin/hubot "$@" -a shell

0 comments on commit 04deccf

Please sign in to comment.