From fa508e72ee946bc5f87061451a7c34695a23b5a1 Mon Sep 17 00:00:00 2001 From: jurgenhaas <juergen.haas@lakedrops.com> Date: Wed, 9 Aug 2023 09:29:15 +0200 Subject: [PATCH] Workaround for https://youtrack.jetbrains.com/issue/IDEA-317355 --- configIdea.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/configIdea.sh b/configIdea.sh index 393d1a4..9da5c93 100755 --- a/configIdea.sh +++ b/configIdea.sh @@ -33,7 +33,13 @@ if [[ ! -f /drupal/.idea/workspace.xml ]]; then echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?><project version=\"4\"></project>" > /drupal/.idea/workspace.xml fi if [[ -f /drupal/.idea/codeStyles/Project.xml ]]; then - sed -i "/\bLINE_SEPARATOR\b/d" /drupal/.idea/codeStyles/Project.xml + grep -q LINE_SEPARATOR /drupal/.idea/codeStyles/Project.xml + if [[ $? -eq 0 ]]; then + sed -i "/foo/!{q100}; {s/\bLINE_SEPARATOR\b/d}" /drupal/.idea/codeStyles/Project.xml + echo -e "\\033[31m ======================================== \\033[0m" + echo -e "\\033[31m IDE setting updated - please restart. \\033[0m" + echo -e "\\033[31m ======================================== \\033[0m" + fi fi php /usr/local/bin/.configIdea.php $UUID -- GitLab