Skip to content

Instantly share code, notes, and snippets.

@msonnabaum
Created July 9, 2010 18:53
Show Gist options
  • Save msonnabaum/469861 to your computer and use it in GitHub Desktop.
Save msonnabaum/469861 to your computer and use it in GitHub Desktop.
#!/bin/bash
DBHOST='localhost'
DBUSER='root'
SITENAME="${1}"
DBNAME="${SITENAME}"
stty -echo
read -p "MySQL Password: " DBPASS;
stty echo
#echo "bzr branch lp:pressflow ${SITENAME}"
#bzr branch lp:pressflow ${SITENAME}
echo "drush make pflow.make ${SITENAME}"
drush make pflow.make ${SITENAME}
echo "mysqladmin create -u${DBUSER} -p${DBPASS} ${SITENAME}"
mysqladmin create -u${DBUSER} -p${DBPASS} ${SITENAME}
echo "cp ${SITENAME}/sites/default/default.settings.php ${SITENAME}/sites/default/settings.php"
cp ${SITENAME}/sites/default/default.settings.php ${SITENAME}/sites/default/settings.php
# setup db
echo "sed -i -e \"91,95 s%username:password@localhost/databasename%${DBUSER}:${DBPASS}@${DBHOST}/${DBNAME}%\" ${SITENAME}/sites/default/settings.php"
sed -i -e "91,95 s%username:password@localhost/databasename%${DBUSER}:${DBPASS}@${DBHOST}/${DBNAME}%" ${SITENAME}/sites/default/settings.php
# make files dir
echo "mkdir ${SITENAME}/sites/default/files; sudo chown -R :_www ${SITENAME}/sites/default/files; sudo chmod -R 775 ${SITENAME}/sites/default/files"
mkdir ${SITENAME}/sites/default/files; sudo chown -R :_www ${SITENAME}/sites/default/files; sudo chmod -R 775 ${SITENAME}/sites/default/files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment