Last active
October 24, 2016 15:13
-
-
Save Kindari/555a51539756044da32056ebfd59746d to your computer and use it in GitHub Desktop.
Art (Laravel Artisan) command that can be used from almost any sub directory
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
art() { | |
# We cheat and assume that artisan is in the root of the repository. Thus the almost any sub directory. :) | |
if [[ $(git rev-parse --is-inside-work-tree 2>/dev/null) = "true" ]]; then | |
php `git rev-parse --show-toplevel`/artisan $@ | |
else | |
echo "Can't find artisan, are you in a git repository?" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment