#!/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
爲Laravel的artisan指令增加bash腳本
保存爲/usr/bin/artisan 並執行 chmod +x /usr/bin/artisan 賦予執行權限
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.