aboutsummaryrefslogtreecommitdiff
path: root/share/templater/drupal7/setup
blob: 7684d0363a5caa5a1e0cfb8029d1fbe24c72cc8f (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
#!/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 "Makefile" ]; then
    #  cp $SHARE/drupal7/files/Makefile .
    ##elif ! grep -q ^drupal: Makefile; then
    ##  grep -v '^#' $SHARE/drupal7/files/Makefile >> Makefile
    #else
    #  cp $SHARE/drupal7/files/Makefile Makefile.drupal7
    #fi

    if [ ! -e "drupal.make.yml" ]; then
      cp $SHARE/drupal7/files/drupal.make.yml .
    fi

    mkdir -p files themes modules libraries
    mkdir -p vendor
  else
    __templater_echo "Drupal already set"
  fi
}

# Dispatch
templater_drupal7