Silverstripe Setup Script
We thought we had to improve our SilverStripe setup script for our development environment.
So Max and me rewrote it to add submodules and some other improvements.
Just run:
./install_silverstripe.sh mynewproject tags/2.4.7
and you have
- silverstripe project folder structure
- the tutorial theme
- a already filled git repository
- sapphire as submodule
- cms as submodule
- Uploadify as submodule
- DataObjectManager as submodule
- UserForms as submodule
What you then still need to do is:
- create the database
- setup a local vhost
- open your project url and run the install process
- start to code
So here it is:
# install silverstripe + common modules from github# usage sh install_silverstripe.sh <folder_name> <tag/branch># examples: # sh install_silverstripe.sh some_folder tags/2.4.5# sh install_silverstripe.sh some_folder master
#set up project base foldergit clone git@github.com:silverstripe/silverstripe-installer.git $1cd $1git checkout $2#we kill the .git because we want this repo just as starter and init our own repository (instead of export)rm -rf .git
#set permissions for installchmod 0777 assets assets/*chmod 0666 .htaccess mysite/_config.php assets/*/*
git init
git submodule add git@github.com:silverstripe/silverstripe-cms.git cmscd cmsgit checkout $2cd ..git add cmsgit commit -m "checked out submodule cms to $2"
git submodule add git@github.com:silverstripe/sapphire.git sapphirecd sapphiregit checkout $2cd ..git add sapphiregit commit -m "checked out submodule sapphire to $2"
# add common modulesgit submodule add git://github.com/unclecheese/Uploadify.git uploadifygit submodule add git://github.com/unclecheese/DataObjectManager.git dataobject_managergit submodule add git://github.com/silverstripe/silverstripe-userforms.git userform
git submodule initgit submodule update
git add .git commit -m "Initial Commit"