install silverstripe with some modules from GIT

This is a small shell script to set up silverstripe CMS
along with some modules i often use (as seen in ivo’s post)

The script has two parameters:
– the folder to clone the whole thing into
– the branch/tag to checkout afterwards

# install silverstripe + common modules from github
# usage sh <folder_name> <tag/branch>
# examples:
# sh some_folder tags/2.4.5
# sh some_folder master

As Silverstripe itself is split up in 3 repositories
(the installer/base folder, the cms and the sapphire framework itself)
we fetch the base folder first:

#set up project base folder
git clone $1
cd $1
git checkout $2

Get the cms

#setup cms
git clone cms
cd cms
git checkout $2
cd ..

Get sapphire …

#setup framework
git clone sapphire
cd sapphire
git checkout $2
cd ..

Setup some permissions for the web installer.

#set permissions for install
chmod 0777 assets assets/*
chmod 0666 .htaccess mysite/_config.php assets/*/*

Fetch the blackcandy theme from a fourth repository.
Backup the tutorial theme in case we need it.

#install blackcandy theme
mv themes/tutorial ./
rm -rf themes
git clone themes
cd themes
git checkout $2
cd ..
mv tutorial themes

Install some modules

# install common modules
git clone uploadify
git clone dataobject_manager
git clone userforms

iIput the script on github
…in case you might wanna use it or add something i’ve missed.