Created
October 13, 2013 20:46
-
-
Save alexwhitman/6967255 to your computer and use it in GitHub Desktop.
artisan helper script to allow running of artisan in any sub-directory within the project.
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
| #!/bin/sh | |
| FOUND=0 | |
| CHECK=`pwd` | |
| until [ $FOUND -eq 1 ]; do | |
| if [ -f $CHECK/artisan ]; then | |
| php $CHECK/artisan "$@" | |
| FOUND=1 | |
| else | |
| if [ $CHECK = '/' ]; then | |
| echo 'Artisan not found'; | |
| exit 1; | |
| fi | |
| CHECK=$(dirname $CHECK) | |
| fi | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment