Skip to content

Instantly share code, notes, and snippets.

@jmervine
Last active September 3, 2016 16:21
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 jmervine/61b652f0f67d74a922600947eb81cd92 to your computer and use it in GitHub Desktop.
Save jmervine/61b652f0f67d74a922600947eb81cd92 to your computer and use it in GitHub Desktop.
# run Procfiles without fore{man,go}
function _procline {
local line=""
if test -z "$1"; then
line=`cat Procfile | head -n1 | awk -F': ' '{ print $2 }'`
else
line=`cat Procfile | grep $1 | awk -F': ' '{ print $2 }'`
fi
echo $line
}
function prun {
local line=`_procline $@`
echo "+ $line"
bash -c $line
}
function berun {
local line=`_procline $@`
echo "+ bundle exec $line"
bash -c "bundle exec $line"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment