From f8fe1a68873ed94f3ccec85dc7719bb49c60f0c5 Mon Sep 17 00:00:00 2001 From: Ralf Koller Date: Sat, 15 Mar 2025 05:44:49 +0100 Subject: [PATCH] add a case sensitivity fs check and set ignore case for none case sensitive --- fs-check.sh | 16 ++++++++++++++++ install.yaml | 2 ++ 2 files changed, 18 insertions(+) create mode 100644 fs-check.sh diff --git a/fs-check.sh b/fs-check.sh new file mode 100644 index 0000000..7b026c7 --- /dev/null +++ b/fs-check.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +# Create two files with a differing capitalization +touch testfile +touch TESTFILE + +# Check if both files exist +if ls | grep -q 'TESTFILE' && ls | grep -q 'testfile'; then + echo "Case-sensitive file system, no action necessary" +else + git -C ../repos/drupal config core.ignorecase true + echo "None case-sensitive file system, ignorecase git configuration setting is set to true for the drupal repository" +fi + +# Clean up +rm -f testfile TESTFILE \ No newline at end of file diff --git a/install.yaml b/install.yaml index f8717de..32fe133 100644 --- a/install.yaml +++ b/install.yaml @@ -5,6 +5,7 @@ name: ddev-drupal-core-dev project_files: - config.ddev-drupal-core-dev.yaml - docker-compose.core-dev-selenium.yaml + - fs-check.sh - core-dev/phpunit-firefox.xml - core-dev/phpunit-chrome.xml - commands/web/drupal @@ -26,6 +27,7 @@ project_files: - core-dev/src/Command/LintCommand.php post_install_actions: + - sh fs-check.sh - cp core-dev/phpunit-chrome.xml ../phpunit.xml - perl -pi -e "s|DRUPAL_CORE_DDEV_URL|$DDEV_PRIMARY_URL|g" ../phpunit.xml - perl -pi -e "'$DDEV_DOCROOT' and s|DDEV_DOCROOT|$DDEV_DOCROOT/|g" ../phpunit.xml