Created
March 21, 2011 04:40
-
-
Save chrislwade/879044 to your computer and use it in GitHub Desktop.
This function wraps the Redcar launcher to set different options based on the current directory. I use this to detect when I'm working on Redcar itself or a plugin for Redcar and launching with debug log output redirected to STDOUT. Otherwise I launch
This file contains 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
function redcar { | |
if [ -f plugin.rb ]; then | |
echo "Found 'plugin.rb'!" | |
echo "Assuming this directory is a Redcar plugin." | |
echo "Running with --show-log, --log-level=debug, and without --fork." | |
wrapped_redcar --show-log --log-level=debug $* | |
elif [ -f lib/redcar.rb ] && [ -f bin/redcar ]; then | |
echo "Found 'lib/redcar.rb' and 'bin/redcar'!" | |
echo "Assuming this is the Redcar application directory." | |
echo "Running with --show-log, --log-level=debug, and without --fork." | |
wrapped_redcar --show-log --log-level=debug $* | |
else | |
wrapped_redcar --fork $* &> $HOME/.redcar/redcar.log | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment