Skip to content

Instantly share code, notes, and snippets.

@azu
Created March 20, 2013 11:57
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 azu/5204113 to your computer and use it in GitHub Desktop.
Save azu/5204113 to your computer and use it in GitHub Desktop.
buildhive for node
export PATH=$HOME/.nodebrew/current/bin:$PATH
if [ -x "$HOME/.nodebrew/current/bin/nodebrew" ]; then
PREV_VER=$(nodebrew ls|grep current:|cut -d ' ' -f 2)
INST_VER=$(node -v)
if [ "$PREV_VER" != "$INST_VER" ]; then
echo "nodebrew install-binary stable"
nodebrew install-binary stable
fi
nodebrew use stable
else
curl https://raw.github.com/hokaccha/nodebrew/master/nodebrew | perl - setup
nodebrew install-binary stable
nodebrew use stable
fi
export DISPLAY=:1
Xvfb :1 &
npm -d install
node_modules/.bin/buster-server &
sleep 5
firefox http://localhost:1111/capture &
sleep 5
node_modules/phantomjs/bin/phantomjs node_modules/buster/script/phantom.js http://localhost:1111/capture &
sleep 5
npm test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment