Skip to content

Instantly share code, notes, and snippets.

@jasonsnider
Last active December 30, 2015 08:59
Show Gist options
  • Save jasonsnider/7806101 to your computer and use it in GitHub Desktop.
Save jasonsnider/7806101 to your computer and use it in GitHub Desktop.
The build script for jasonsnider.com
#!/bin/sh
# Rebuilds parbaked project from it's git repositories
# Jason D Snider <[email protected]>
# Configure the build script
PROJECT_PATH="/var/www/jasonsnider.com"
APACHE_PROCESS="www-data"
USER="jsnider"
GIT_ACCESS="[email protected]:"
## Start by removing the entire website
rm -fR "$PROJECT_PATH"/app
## Build the code base
### Install the Tinker code base
cd "$PROJECT_PATH" && git clone "$GIT_ACCESS"parbake/parbake.git app
### Install the Config directory
cd "$PROJECT_PATH"/app && git clone ssh://[email protected]/jasonsnider/config-jasonsnider.com.git Config
### Install the plugins
cd "$PROJECT_PATH"/app/Plugin && git clone "$GIT_ACCESS"parbake/Contents-plugin.git Contents
cd "$PROJECT_PATH"/app/Plugin && git clone "$GIT_ACCESS"parbake/Users-plugin.git Users
cd "$PROJECT_PATH"/app/Plugin && git clone "$GIT_ACCESS"parbake/Utilities-plugin.git Utilities
cd "$PROJECT_PATH"/app/Plugin && git clone "$GIT_ACCESS"jasonsnider/CakePHP-Audit-Log-Plugin.git AuditLog
### Install the themes
cd "$PROJECT_PATH"/app/View/Themed && git clone "$GIT_ACCESS"jasonsnider/JasonSnider-theme.git JasonSnider
### Install the vendor libraries
cd "$PROJECT_PATH"/app/Vendor && git clone git://repo.or.cz/htmlpurifier.git HtmlPurifier
sudo chown "$APACHE_PROCESS":"$USER" -fR "$PROJECT_PATH"/lib/Cake/Cache -fR
sudo chown "$APACHE_PROCESS":"$USER" -fR "$PROJECT_PATH"/app/tmp -fR
sudo chown "$APACHE_PROCESS":"$USER" -fR "$PROJECT_PATH"/app/Vendor/HtmlPurifier/library/HTMLPurifier/DefinitionCache/Serializer -fR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment