-
Notifications
You must be signed in to change notification settings - Fork 2
/
default.install.sh
41 lines (28 loc) · 1.06 KB
/
default.install.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
#!/usr/bin/env bash
# Modify the MySQL settings below so they will match your own.
MYSQL_USERNAME="root"
MYSQL_PASSWORD="root"
MYSQL_HOST="localhost"
MYSQL_DB_NAME="comics_migration"
# Get the base url for automatic login.
BASE_DOMAIN_URL="http://localhost/comics_migration/web"
# Admin username details
ADMIN_USERNAME="admin"
ADMIN_PASSWORD="admin"
DRUSH="../vendor/bin/drush"
# Installing composer
composer install
cd web
# Install Drupal
$DRUSH si comics --db-url=mysql://${MYSQL_USERNAME}:${MYSQL_PASSWORD}@${MYSQL_HOST}/${MYSQL_DB_NAME} --account-name=${ADMIN_USERNAME} --account-pass=${ADMIN_PASSWORD} -y
# CSV2SQL.
$DRUSH csv2sql modules/custom/comics_migration/migration_assets/heroes.csv
# Change settings.php file permissions.
sudo chmod 777 sites/default/settings.php
# Add migration database settings.
echo "\$databases['migrate']['default'] = \$databases['default']['default'];" >> sites/default/settings.php
# Change settings.php file permissions back.
sudo chmod 644 sites/default/settings.php
$DRUSH mi --all
# Login
$DRUSH uli --uri=${BASE_DOMAIN_URL}