Skip to content
This repository has been archived by the owner on Jan 26, 2018. It is now read-only.

Gain the ability to have a private settings.local.php local.make and loc... #82

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ docroot

# User files #
##############
drupalcatinstall.sh
settings.local.php
local.sh
local.make

# OS generated files #
######################
Expand Down
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,21 @@ Aquest repositori té el codi del web [drupal.cat](http://drupal.cat), realitzat
1. Fer un fork d'aquest repositori
2. Clonar el fork d'aquest repositori
3. Accedir dins la carpeta drupalcat creada per defecte `cd drupalcat`
4. Copiar el fitxer `drupalcatinstall.sh.example` i anomenar-lo `drupalcatinstall.sh` executant la comanda `cp drupalcatinstall.sh.example drupalcatinstall.sh`
5. Editar el fitxer `drupalcatinstall.sh` amb les dades de la vostra base de dades.
6. Executar el fitxer `drupalcatinstall.sh` amb la comanda `./drupalcatinstall.sh`
4. Crear settings.local.php amb la informació de base de dades

<?php
$databases['default']['default'] = array (
'database' => 'test',
'username' => 'root',
'password' => 'Password',
'prefix' => '',
'host' => 'localhost',
'port' => '',
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
'driver' => 'mysql',
);

5. Executar el fitxer `drupalcatinstall.sh` amb la comanda `./drupalcatinstall.sh`

### Instal·lació manual
1. Clonar aquest repositori `git clone [email protected]:Drupalcat/drupalcat.git`
Expand Down
34 changes: 34 additions & 0 deletions drupalcatinstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash
# Get the repo root dir as a reference.
export REPO_DIR=$(git rev-parse --show-toplevel 2> /dev/null)
echo $REPO_DIR

# Make sure there is no docroot.
chmod -R 777 $REPO_DIR/docroot
rm -rf $REPO_DIR/docroot
# Download drupal core and contrib modules.
drush -y make $REPO_DIR/drupalcat.make $REPO_DIR/docroot
if [ -f $REPO_DIR/local.make ] ; then
drush make --working-copy --no-core local.make $REPO_DIR/docroot
fi
# Place install profile to the docroot. Is preferable to use soft links so you
# don't have two copies of the same code.
ln -s $REPO_DIR/drupalcat $REPO_DIR/docroot/profiles/
# Symlink also settings.php
ln -s $REPO_DIR/settings.php $REPO_DIR/docroot/sites/default/
ln -s $REPO_DIR/settings.local.php $REPO_DIR/docroot/sites/default/
# Install the site.
cd $REPO_DIR/docroot
drush -y site-install --locale=ca --account-pass=admin drupalcat
# login as admin after the install.
drush uli
# Capture configuration just after the install so we can diff our changes.
drush -y config-export
# Enable useful modules for development.
drush -y en field_ui config menu_ui views_ui
# Execute additional custom scripts. for example enable devel
if [ -f $REPO_DIR/local.sh ] ; then
$REPO_DIR/local.sh
fi
# Back to the initial dir.
cd -
15 changes: 0 additions & 15 deletions drupalcatinstall.sh.example

This file was deleted.

Loading