-
Notifications
You must be signed in to change notification settings - Fork 1
/
stackato-setup.sh
61 lines (45 loc) · 1.55 KB
/
stackato-setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/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.9.tar.gz
if ! [ -s $HOME/index.php ]
then
# download required files
echo "Downloading Drush and Amani..."
git clone https://github.com/drush-ops/drush.git $SAR/drush
#curl -sfS $DRUSH | tar xzf -
#mv drush $SAR
git clone -v https://github.com/PeaceGeeks/amani.git
# I broke the symlink when I moved the repo to my machine
rm amani/core/profiles/amani
# Must run drush within the Core folder
echo "Migrating drupal core into application root..."
mv amani/core/* amani/core/.??* $HOME
echo "Link Amani profile to core drupal"
mv amani/amani profiles/
#ln -s profiles/amani amani/amani
# create folders in the shared filesystem
mkdir -p $FS/sites
echo "Migrating data to shared filesystem..."
cp -r sites/* $FS/sites
echo "Symlink to folders in shared filesystem..."
#rm -fr sites
ln -sf $FS/sites sites
fi
# allow custom profile installations (if exist)
if [ -s custom-profile.sh ]
then
bash custom-profile.sh
fi
ls $FS
if ! [ -e $FS/INSTALLED ]
then
echo "Installing Drupal..."
#$SAR/drush/drush site-install -y --db-url=$DATABASE_URL amani --account-name=admin --account-pass=passwd [email protected]
$SAR/drush/drush si -y --db-url=$DATABASE_URL amani
# Drupal successfully installed
touch $FS/INSTALLED
fi
echo "All Done!"