Created
July 6, 2015 07:18
-
-
Save timmillwood/03b241bb3c42f22fd1ee to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
echo "Starting Deploy..." | |
echo "Check for the files directory, if not created - create it" | |
if [ ! -d ${OPENSHIFT_DATA_DIR}sites/default/files ]; then | |
mkdir -p ${OPENSHIFT_DATA_DIR}sites/default/files | |
echo "Done creating files directory" | |
else | |
echo "The files directory already exists" | |
fi | |
#### | |
echo "Check for the private directory, if not created - create it" | |
if [ ! -d ${OPENSHIFT_DATA_DIR}private ]; then | |
mkdir -p ${OPENSHIFT_DATA_DIR}private | |
echo "Done creating private directory" | |
else | |
echo "The private directory already exists" | |
fi | |
#### | |
echo "Check for the tmp directory, if not created - create it" | |
if [ ! -d ${OPENSHIFT_DATA_DIR}tmp ]; then | |
mkdir -p ${OPENSHIFT_DATA_DIR}tmp | |
echo "Done creating tmp directory" | |
else | |
echo "The tmp directory already exists" | |
fi | |
#### | |
echo "Check for the active directory, if not created - create it" | |
if [ ! -d ${OPENSHIFT_DATA_DIR}active ]; then | |
mkdir -p ${OPENSHIFT_DATA_DIR}active | |
echo "Done creating active directory" | |
else | |
echo "The active directory already exists" | |
fi | |
#### | |
echo "Check for the staging directory, if not created - create it" | |
if [ ! -d ${OPENSHIFT_DATA_DIR}staging ]; then | |
mkdir -p ${OPENSHIFT_DATA_DIR}staging | |
echo "Done creating staging directory" | |
else | |
echo "The staging directory already exists" | |
fi | |
#### | |
# Set permissions on the files directory. | |
echo "Now chmod 777 -R files and private" | |
chmod -R 777 ${OPENSHIFT_DATA_DIR}sites/default/files | |
chmod -R 777 ${OPENSHIFT_DATA_DIR}private | |
chmod -R 777 ${OPENSHIFT_DATA_DIR}tmp | |
chmod -R 777 ${OPENSHIFT_DATA_DIR}active | |
chmod -R 777 ${OPENSHIFT_DATA_DIR}staging | |
echo "chmod done, permissions set to 777" | |
#### | |
# Symlink our files folder to the repo. | |
echo "Create sym links for writeable directories" | |
ln -sf ${OPENSHIFT_DATA_DIR}sites/default/files ${OPENSHIFT_REPO_DIR}web/sites/default | |
echo "Files sym links created" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment