Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use unicorn if available

  • Loading branch information...
commit ad93a6a55d8290743e5d113ac89e780e6dd56da5 1 parent 3468292
David Genord II authored
Showing with 14 additions and 1 deletion.
  1. +14 −1 aliases
View
15 aliases
@@ -68,7 +68,20 @@ function sr {
fi
}
function ss {
- if [ -f './script/rails' ]; then
+ if [ -f './config/unicorn.rb' ]; then
+ echo "$*" | grep -E "(^| )-p " > /dev/null 2>&1
+ if [ $? != 1 ]; then
+ PORT=""
+ else
+ PORT="-p 3000"
+ fi
+
+ if [ -f './script/rails' ]; then
+ bundle exec unicorn_rails $PORT $*
+ else
+ bundle exec unicorn $PORT $*
+ fi
+ elif [ -f './script/rails' ]; then
./script/rails server $*
elif [ -f './script/server' ]; then
./script/server $*
Please sign in to comment.
Something went wrong with that request. Please try again.