Skip to content

Instantly share code, notes, and snippets.

@charlieman
Created August 17, 2011 15:31
Show Gist options
  • Save charlieman/1151789 to your computer and use it in GitHub Desktop.
Save charlieman/1151789 to your computer and use it in GitHub Desktop.
Run the Symfony2 console from anywhere inside your project
#!/bin/bash
#from http://vvv.tobiassjosten.net/symfony/symfony2-cli-bash-script
PWD=$(pwd)
while [ "$PWD" != '/' ]; do
if [ -f "$PWD/app/console" ]; then
php "$PWD/app/console" $@
exit
fi
cd ..
done
echo 'Symfony console could not be found!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment