blob: 6335b37491688c70e5f0ffea65070f1dea62b807 (
plain)
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
62
63
64
65
66
67
|
#!/bin/bash
#
# Drupal 7 templater module.
#
# Parameters
SHARE="$1"
# Include basic functions
source $SHARE/templater/functions || exit 1
# Drupal7 implementation
function templater_drupal7 {
if [ ! -e 'settings.dev.php' ]; then
templater_echo "Setting up Drupal 7..."
if [ ! -e ".gitignore" ] || ! grep -q "^settings.php" .gitignore; then
echo settings.php >> .gitignore
echo settings.local.php >> .gitignore
echo settings.prod.php >> .gitignore
echo files >> .gitignore
echo sql >> .gitignore
fi
if [ ! -e "settings.dev.php" ]; then
cp $SHARE/drupal7/files/default.settings.php settings.dev.php
#cp $SHARE/drupal7/files/default.settings.php .
fi
ln -sf settings.dev.php settings.php
if [ ! -e "settings.local.php" ]; then
cp $SHARE/drupal7/files/settings.local.php settings.local.php
fi
templater_install_makefile $SHARE/drupal7/files/Makefile.drupal7
if [ ! -e "drupal.make.yml" ]; then
cp $SHARE/drupal7/files/drupal.make.yml .
fi
if [ ! -e "README.drupal7.md" ]; then
cp $SHARE/drupal7/files/README.drupal8.md .
fi
if [ -d "puppet" ] && [ ! -e "puppet/Puppetfile" ]; then
cp $SHARE/drupal7/files/puppet/Puppetfile puppet/
else
cp $SHARE/drupal7/files/puppet/Puppetfile puppet/Puppetfile.drupal8
fi
# Use pushtodeploy instead
#if [ ! -e "bin/post-receive" ]; then
# mkdir -p bin && cp $SHARE/drupal7/files/bin/post-receive bin/
#fi
templater_echo "Please use pushtodeploy module for automatede deploymends"
mkdir -p files themes modules libraries vendor
touch {files,config,themes,modules,libraries,vendor}/.empty
git add -f {files,themes,modules,libraries}/.empty
else
templater_echo "Drupal already set"
fi
}
# Dispatch
templater_drupal7
|