Last active
August 29, 2015 14:05
-
-
Save ijobling/ad9600b66e8dec8bbc5f to your computer and use it in GitHub Desktop.
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
########################################################################## | |
#### Script to copy install process explained in codio Cakephp Tutorial at | |
#### https://codio.com/s/docs/specifics/cakephp/ | |
########################################################################## | |
#### Instructions | |
#### Option 1. | |
#### From the Codio Dashboard, create a new project and select the Git Tab | |
#### and then paste the following URL into the box | |
#### https://gist.github.com/ad9600b66e8dec8bbc5f.git | |
#### Give your project a name and click Create. | |
#### Option 2. | |
#### From the Codio Dashboard, create a new Empty template project. | |
#### Open a Terminal window from the Tools->Terminal window | |
#### Copy the contents of this file to a file called 'cakephpinst.sh' in the root of your machines file system | |
#### Then run the script in the terminal window by typing | |
#### bash cakephpinst.sh | |
#### End of Instructions | |
########################################################################## | |
echo | |
echo " START OF AUTOMATED INSTALL" | |
echo | |
# set the hostname variable | |
CODIO_HOST=`cat /etc/hostname` | |
# set colour output = echo -e '\E[1;33;44m' | |
# remove colour = ; tput sgr0 | |
# See http://www.tldp.org/LDP/abs/html/colorizing.html for colour codes | |
echo -e '\E[1;33;44m' "Remove the initial git folder, we will init a new one later"; tput sgr0 | |
rm -rf .git/ | |
echo -e '\E[1;33;44m' "Install php mysql apache and composer services"; tput sgr0 | |
parts install php5 php5-apache2 mysql composer php5-intl | |
echo -e '\E[1;33;44m' "Start the apache and mysql services"; tput sgr0 | |
parts start apache2 mysql | |
echo -e '\E[1;33;44m' "Remove file to allow process to continue"; tput sgr0 | |
rm cakephpinst.sh | |
echo -e '\E[1;33;44m' "Install CakePHP"; tput sgr0 | |
composer create-project -s dev cakephp/app ~/workspace --prefer-dist | |
echo -e '\E[1;33;44m' "Add your project to git version control"; tput sgr0 | |
git init | |
git add . | |
git commit -m "initial commit" | |
echo | |
echo | |
echo -e '\E[1;37;44m'" ......CakePHP Installed!"; tput sgr0 | |
echo - | |
echo To get to your CakePHP site, open your browser and go to - | |
echo | |
echo http://"$CODIO_HOST".codio.io:3000 | |
echo | |
echo "or" | |
echo from the Preview menu - the right most Codio menu and select | |
echo the drop down menu and check New Browser Tab and select Box URL. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment