Skip to content

Instantly share code, notes, and snippets.

@alexwhitman
Created October 13, 2013 20:46
Show Gist options
  • Save alexwhitman/6967255 to your computer and use it in GitHub Desktop.
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.
#!/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