diff --git a/configIdea.sh b/configIdea.sh index 393d1a402fb92771763d7b9dcf24143aadd7e6ef..9da5c93179f42238577bbeac7272fe8e444839b8 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