Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

51 lines (39 sloc) 1.304 kB
#!/bin/bash
#echo "This script does Stackato setup related to filesystem."
#echo "This script also handles Drupal Setup."
FS=$STACKATO_FILESYSTEM
SAR=$STACKATO_APP_ROOT
DRUSH=http://ftp.drupal.org/files/projects/drush-7.x-5.7.tar.gz
if ! [ -s $HOME/index.php ]
then
# create folders in the shared filesystem
mkdir -p $FS/sites
# download required files
echo "Downloading Drush and Drupal..."
curl -sfS $DRUSH | tar xzf -
mv drush $SAR
$SAR/drush/drush dl drupal --drupal-project-rename=drupal --yes
mv drupal/* drupal/.??* .
rmdir drupal
fi
echo "Migrating data to shared filesystem..."
cp -r sites/* $FS/sites
echo "Symlink to folders in shared filesystem..."
rm -fr sites
ln -s $FS/sites sites
# allow custom profile installations (if exist)
if [ -s custom-profile.sh ]
then
bash custom-profile.sh
fi
if ! [ -e $FS/INSTALLED ]
then
echo "Installing Drupal..."
$SAR/drush/drush -r $HOME site-install -y --db-url=$DATABASE_URL --account-name=admin --account-pass=passwd --site-name=Stackato --locale=en-US
echo "Installing Drupal modules..."
$SAR/drush/drush -r $HOME dl pathauto,views --yes
$SAR/drush/drush -r $HOME en pathauto,views_ui --yes
# Drupal successfully installed
touch $FS/INSTALLED
fi
echo "All Done!"
Jump to Line
Something went wrong with that request. Please try again.