Created
November 16, 2013 00:13
-
-
Save mattkirwan/7494033 to your computer and use it in GitHub Desktop.
A nice simple shell script for create a quick framework based project. Currently only supports Laravel, but will adapt with Silex another time
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
#!/bin/bash | |
function install_laravel() { | |
echo "Installing Laravel into '$project_name'..." | |
wget https://github.com/laravel/laravel/archive/master.zip ./ | |
unzip ./master.zip | |
rm -rf ./master.zip* | |
rm -rf ./$project_name/public | |
rm -rf ./laravel-master/.git* ./laravel-master/CONTRIBUTING.md ./laravel-master/readme.md | |
mv ./laravel-master/public ./$project_name/ | |
mv -f ./laravel-master/* ./$project_name/ | |
rm -rf ./laravel-master | |
cd ./$project_name | |
composer install | |
return 1 | |
} | |
echo "Project Name:" | |
read project_name | |
git clone https://github.com/jamiefdhurst/vagrant-dev.git $project_name | |
rm -rf ./$project_name/.git* ./$project_name/README.md | |
while true; do | |
read -p "Software Stack: Laravel[L]:" software | |
case $software in | |
[Ll]* ) install_laravel $project_name; break;; | |
* ) echo "Invalid software stack.";; | |
esac | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You know that you can do a laravel install via composer??
Think of it like git where
$project_name
is the folder name for a clone. This means that you can also just do.
to install to current dir.