From 977abed1c2d4a7fe908a5c91afcf93c3d9b053b1 Mon Sep 17 00:00:00 2001 From: Dominik Przybyl Date: Wed, 27 Nov 2024 19:12:34 +0100 Subject: [PATCH] minor --- pkg/project/common/aemw | 3 +- scripts/tools-install-idea.sh | 81 ++++++++++++++++++----------------- 2 files changed, 43 insertions(+), 41 deletions(-) diff --git a/pkg/project/common/aemw b/pkg/project/common/aemw index c1c8b4f..80cb7a7 100755 --- a/pkg/project/common/aemw +++ b/pkg/project/common/aemw @@ -124,4 +124,5 @@ export MSYS2_ENV_CONV_EXCL="*" # Execute AEM Compose CLI # ======================= -aem "$@" +AEM=$(whereis aem | awk '{print $2}') +${AEM} "$@" diff --git a/scripts/tools-install-idea.sh b/scripts/tools-install-idea.sh index 802149c..a683d39 100644 --- a/scripts/tools-install-idea.sh +++ b/scripts/tools-install-idea.sh @@ -1,11 +1,12 @@ -# Check if Taskfile.yaml exists -if [ ! -f "Taskfile.yaml" ]; then - echo "Taskfile.yaml not found in the current directory." +# Check if Taskfile.yml exists +if [ ! -f "Taskfile.yml" ]; then + echo "Taskfile.yml not found in the current directory." exit 1 fi -# Define content to be appended to 'Taskfile.yaml' -TASKS_YAML_CONTENT=$(cat <<'EOF' +# Define content to be appended to 'Taskfile.yml' +TASKS_YML_CONTENT=$(cat <<'EOF' + groovy:execute: desc: execute Groovy script on AEM instance cmd: | @@ -79,69 +80,69 @@ TASKS_YAML_CONTENT=$(cat <<'EOF' EOF ) -# Define IDEA's 'tools/AEM.xml' content -AEM_XML_CONTENT=$(cat <<'EOF' - - +# Define IDEA's 'tools/AEMC.xml' content +AEMC_XML_CONTENT=$(cat <<'EOF' + + - + - + - + - - + - - + - - + - - + - + @@ -149,27 +150,27 @@ AEM_XML_CONTENT=$(cat <<'EOF' EOF ) -# Function to create 'tools/AEM.xml' in IntelliJ installations -create_aem_xml() { +# Function to create 'tools/AEMC.xml' in IntelliJ installations +create_aemc_xml() { local intellij_dirs=( "$HOME/Library/Application Support/JetBrains/IntelliJIdea"*/tools ) for dir in "${intellij_dirs[@]}"; do if [ -d "$dir" ]; then - local aem_file="$dir/AEM.xml" - echo "Creating AEM.xml in $aem_file" - echo "$AEM_XML_CONTENT" > "$aem_file" + local aem_file="$dir/AEMC.xml" + echo "Creating AEMC.xml in $aem_file" + echo "$AEMC_XML_CONTENT" > "$aem_file" fi done } -# Create AEM.xml in IntelliJ installations -create_aem_xml +# Create AEMC.xml in IntelliJ installations +create_aemc_xml -# Append tasks.yaml content to Taskfile.yaml -echo "Appending tasks.yaml content to Taskfile.yaml" -echo "$TASKS_YAML_CONTENT" >> "Taskfile.yaml" +# Append tasks.yml content to Taskfile.yml +echo "Appending tasks.yml content to Taskfile.yml" +echo "$TASKS_YML_CONTENT" >> "Taskfile.yml" echo "Script execution completed." echo "Please restart IntelliJ IDEA to see the changes."