From 04deccfdb682b3c59d2aea1cd33a6834d3ae3aa3 Mon Sep 17 00:00:00 2001 From: Sean Cribbs Date: Tue, 6 Mar 2012 19:07:03 -0500 Subject: [PATCH] Separate the heroku env slurping into a separate script and simplify it considerably. --- bin/hubot | 13 +------------ bin/hubot-dev | 3 +++ 2 files changed, 4 insertions(+), 12 deletions(-) create mode 100755 bin/hubot-dev diff --git a/bin/hubot b/bin/hubot index 0fb47d4..3df5fc7 100755 --- a/bin/hubot +++ b/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 "$@" diff --git a/bin/hubot-dev b/bin/hubot-dev new file mode 100755 index 0000000..3f50586 --- /dev/null +++ b/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