#!/bin/bash if [ -f "./artisan" ]; then php artisan "$@" else if [ "$1" == "create" ]; then if [ ! `which git` ]; then echo "For this installer to work you'll need to install Git." echo 'http://gitref.org/' fi git clone --recursive git://github.com/laravel/laravel.git "./$2" cd "$2"; chmod -R 0777 storage/ else echo 'This is not a valid laravel installation so artisan is a bit lost.' echo 'http://laravel.com/docs/install#installation' fi fi
保存为/usr/bin/artisan 并执行 chmod +x /usr/bin/artisan 赋予执行权限