-
-
Save Greg-Boggs/03e4eeac029d6dd98f9c 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
#!/bin/bash | |
# Script to install Drupal app | |
# Be careful using database credentials, this script is meant to be used on development server, to speed things up. | |
dbuser="root" | |
dbpass="root" | |
sites_path="~/Sites" | |
if [ $# -lt 1 ]; | |
then | |
echo "Usage: install_drupal.sh appname [dbname]" | |
exit | |
fi | |
appname=$1 | |
if [ $# -eq 2 ]; | |
then | |
dbname=$2 | |
else | |
dbname=$1 | |
fi | |
current_path=`pwd` | |
cd $sites_path | |
echo "About to installing application $appname on database $dbname." | |
echo "Downloading Drupal..." | |
drush dl drupal --drupal-project-rename=$appname | |
cd $appname | |
echo "Installing Drupal..." | |
drush site-install --db-url="mysql://$dbuser:$dbpass@localhost/$dbname" --site-name=$appname | |
echo "Done." | |
cd $current_path; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment