Created
August 4, 2011 17:45
-
-
Save gvarela/1125736 to your computer and use it in GitHub Desktop.
manage spork easily
This file contains hidden or 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
#!/usr/bin/env bash | |
if [ $@ == 'start' ] | |
then | |
bundle exec spork & | |
rspec_pid=$! | |
bundle exec spork cucumber & | |
cuke_pid=$! | |
echo "$rspec_pid $cuke_pid" > tmp/spork.pids | |
exit | |
fi | |
if [ $@ == 'kill' ] | |
then kill -9 `cat tmp/spork.pids` | |
fi | |
if [ $@ == 'restart' ] | |
then ./script/spork kill && ./script/spork start | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment