diff --git a/scripts/development/common.inc.sh b/scripts/development/common.inc.sh index bb783cb..f9e9cce 100644 --- a/scripts/development/common.inc.sh +++ b/scripts/development/common.inc.sh @@ -3,8 +3,8 @@ # Exit on failure # set -e -REFERENCE_DUMP_FILE="assets/post-import.sql" ASSETSDIR=assets +REFERENCE_DUMP_FILE="$ASSETSDIR/post-import.sql" SCOPE=dev ROOT=docroot PROFILE=startup diff --git a/scripts/development/install.sh b/scripts/development/install.sh index 2be53cc..a496ac5 100755 --- a/scripts/development/install.sh +++ b/scripts/development/install.sh @@ -8,13 +8,13 @@ source $(dirname "$0")/common.inc.sh clean # Copy the settings.local.php to the default site if it doesn't exist already. -if [ ! -f "docroot/sites/default/settings.local.php" ]; then - run_command "Installing default config" "cp docroot/sites/default.settings.local.php docroot/sites/default/settings.local.php" +if [ ! -f "$ROOT/sites/default/settings.local.php" ]; then + run_command "Installing default config" "cp $ROOT/sites/default.settings.local.php $ROOT/sites/default/settings.local.php" fi run_command "Install Site." "./bin/drush site-install --account-pass=admin $PROFILE $DRUSH_GLOBALS -y" -run_command "Resetting the site UUID." "./bin/drush config-set system.site uuid $UUID $DRUSH_GLOBALS" -run_command "Clearing the cache." "./bin/drush cr -r $ROOT" -run_command "Creating reference database dump" "./bin/drush -r $ROOT sql-dump --result-file=../$ASSETSDIR/post-install.sql" +run_command "Resetting the site UUID." "./bin/drush config-set system.site uuid $UUID $DRUSH_GLOBALS -y" +run_command "Clearing the cache." "./bin/drush cr $DRUSH_GLOBALS" +run_command "Creating reference database dump" "./bin/drush $DRUSH_GLOBALS sql-dump --result-file=../$ASSETSDIR/post-install.sql" echo "Setup complete." diff --git a/scripts/development/refresh.sh b/scripts/development/refresh.sh index f1daa2f..9ec1cc3 100755 --- a/scripts/development/refresh.sh +++ b/scripts/development/refresh.sh @@ -21,11 +21,11 @@ if [[ ! $KEEPDB ]]; then run_command "Restoring database" "./bin/drupal database:restore --file=../assets/post-install.sql" fi run_command "Composer install." "composer install" -run_command "Clearing caches." "./bin/drush cr -r $ROOT" +run_command "Clearing caches." "./bin/drush cr $DRUSH_GLOBALS" run_command "Module sync." "./bin/drush module-sync --scope=$SCOPE $DRUSH_GLOBALS" run_command "Importing configuration." "./bin/drush config-split:import $DRUSH_GLOBALS" -run_command "Updating database." "./bin/drush updatedb $DRUSH_GLOBALS" -run_command "Entity updates." "./bin/drush entup -r $ROOT" -run_command "Clearing caches." "./bin/drush cr -r $ROOT" +run_command "Updating database." "./bin/drush updatedb $DRUSH_GLOBALS -y" +run_command "Entity updates." "./bin/drush entup $DRUSH_GLOBALS" +run_command "Clearing caches." "./bin/drush cr $DRUSH_GLOBALS" echo "Refresh complete."