diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-10-27 18:47:19 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-10-27 18:47:19 -0200 |
commit | de4ef81615eae8e03a16dcc4df054a233c3f70c0 (patch) | |
tree | 8224ff0d9c9e045c2969922124cebd41aa1cc543 /templater | |
parent | c1e0bcfe4ce68e78e9eaa22ba731c82190ff1775 (diff) | |
download | templater-de4ef81615eae8e03a16dcc4df054a233c3f70c0.tar.gz templater-de4ef81615eae8e03a16dcc4df054a233c3f70c0.tar.bz2 |
Drupal config
Diffstat (limited to 'templater')
-rwxr-xr-x | templater | 62 |
1 files changed, 49 insertions, 13 deletions
@@ -10,13 +10,13 @@ BASENAME="`basename $0`" PROJECT="$1" shift MODULES="$*" -BOOTSTRAP="https://git.fluxo.info/puppet-bootstrap.git" +BOOTSTRAP="https://git.fluxo.info/puppet-bootstrap" CWD="`pwd`" # Initialize project function __templater_init { if [ ! -d "$PROJECT" ]; then - echo "Initializing $PROJECT..." + __templater_echo "Initializing $PROJECT..." mkdir -p $PROJECT fi } @@ -92,7 +92,7 @@ function templater_basic { # Git implementation function templater_git { if [ ! -d ".git" ]; then - __templater___templater_echo "Setting up git..." + __templater_echo "Setting up git..." touch .gitignore git init @@ -108,7 +108,7 @@ function templater_githooks { # TODO: check if githooks are already set if [ -d ".git" ]; then if which git-hooks &> /dev/null; then - __templater___templater_echo "Setting up git-hooks..." + __templater_echo "Setting up git-hooks..." git hooks --install fi else @@ -120,7 +120,7 @@ function templater_githooks { function templater_gitflow { if ! grep -q '^\[gitflow' .git/config; then if ! git branch --list develop | grep -q develop; then - __templater___templater_echo "Setting up git-flow..." + __templater_echo "Setting up git-flow..." git branch develop @@ -138,7 +138,7 @@ function templater_gitflow { # Vagrant implementation function templater_vagrant { if [ ! -e "Vagrantfile" ]; then - __templater___templater_echo "Setting up vagrant..." + __templater_echo "Setting up vagrant..." #__templater_checkout_develop vagrant init echo '.vagrant' >> .gitignore @@ -151,7 +151,7 @@ function templater_vagrant { # KVMX implementation function templater_kvmx { if [ ! -e "kvmxfile" ]; then - __templater___templater_echo "Setting up kvmx..." + __templater_echo "Setting up kvmx..." kvmx init #git commit -a -m "Adds kvmx support" else @@ -162,7 +162,7 @@ function templater_kvmx { # Puppet implementation function templater_puppet { if [ ! -d "puppet" ]; then - __templater___templater_echo "Setting up puppet..." + __templater_echo "Setting up puppet..." if [ ! -d '.git' ]; then __templater_echo "Error: puppet needs a working git setup, skipping" @@ -187,7 +187,7 @@ function templater_puppet { # Ikiwiki implementation function templater_ikiwiki { if [ ! -e "ikiwiki.yaml" ]; then - __templater___templater_echo "Setting up ikiwiki..." + __templater_echo "Setting up ikiwiki..." #__templater_checkout_develop __templater_copy_or_append ikiwiki .gitignore @@ -297,14 +297,50 @@ function templater_jekyll { # Drupal7 implementation function templater_drupal7 { - echo "TODO: drupal7" - true + if [ ! -e 'settings.dev.php' ]; then + __templater_echo "Setting up Drupal 7..." + + #if [ ! -e "Makefile" ]; then + # cp $DIRNAME/share/drupal7/Makefile . + ##elif ! grep -q ^drupal: Makefile; then + ## grep -v '^#' $DIRNAME/share/drupal7/Makefile >> Makefile + #else + # cp $DIRNAME/share/drupal7/Makefile Makefile.drupal7 + #fi + + if [ ! -e "drupal.make.yml" ]; then + cp $DIRNAME/share/drupal7/drupal.make.yml . + fi + + mkdir -p files themes modules libraries + mkdir -p vendor + else + __templater_echo "Drupal already set" + fi } # Drupal8 implementation function templater_drupal8 { - echo "TODO: drupal8" - true + if [ ! -e 'settings.dev.php' ]; then + __templater_echo "Setting up Drupal 8..." + + if [ ! -e "Makefile" ]; then + cp $DIRNAME/share/drupal8/Makefile . + #elif ! grep -q ^drupal: Makefile; then + # grep -v '^#' $DIRNAME/share/drupal8/Makefile >> Makefile + else + cp $DIRNAME/share/drupal8/Makefile Makefile.drupal8 + fi + + if [ ! -e "drupal.make.yml" ]; then + cp $DIRNAME/share/drupal8/drupal.make.yml . + fi + + mkdir -p files config themes modules libraries + mkdir -p vendor + else + __templater_echo "Drupal already set" + fi } # Syntax check |