oliverdavies.uk/tools/scripts/symlink.sh
Oliver Davies c722387743 Move the opdavies theme, add symlink
As per https://github.com/drupal-tome/tome-project.

> When composer install or update is ran, the "modules" and "themes"
directories, as well as the "settings.php" file, is symlinked into the
"web" directory.
2025-05-11 23:56:07 +01:00

19 lines
483 B
PHP
Executable file

#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
if [ ! -L web/sites/default/settings.php ] && [ ! -e web/sites/default/settings.php ]; then
ln -s ../../../settings.php web/sites/default/settings.php
fi
mkdir -p web/{modules,themes}
if [ ! -L web/themes/custom ] && [ ! -e web/themes/custom ]; then
ln -s ../../themes web/themes/custom
fi
if [ ! -L web/modules/custom ] && [ ! -e web/modules/custom ]; then
ln -s ../../modules web/modules/custom
fi