From f6f3671298f66472e6ffd46a41c22f6a93901ab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Hohwiller?= Date: Tue, 11 Jan 2022 17:20:39 +0100 Subject: [PATCH] #678: prevent to add extra to path (#682) --- .../resources/scripts/environment-project | 23 +++++++++++-------- .../resources/scripts/environment-project.bat | 18 ++++++++------- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/scripts/src/main/resources/scripts/environment-project b/scripts/src/main/resources/scripts/environment-project index 297b4b387..b580e41ae 100755 --- a/scripts/src/main/resources/scripts/environment-project +++ b/scripts/src/main/resources/scripts/environment-project @@ -129,17 +129,20 @@ fi SOFTWARE_PATH=${DEVON_IDE_HOME}/software for SOFTWARE_FOLDER in "${SOFTWARE_PATH}"/* do - if [ -d "${SOFTWARE_FOLDER}/bin" ] + if [ "${SOFTWARE_FOLDER}" != "${SOFTWARE_PATH}/extra" ] then - PATH="${SOFTWARE_FOLDER}/bin:${PATH}" - else - PATH="${SOFTWARE_FOLDER}:${PATH}" - fi - # Load custom configuration of software - if [ -e "${SOFTWARE_FOLDER}/ide-config" ] - then - # shellcheck disable=SC1090 - source "${SOFTWARE_FOLDER}/ide-config" + if [ -d "${SOFTWARE_FOLDER}/bin" ] + then + PATH="${SOFTWARE_FOLDER}/bin:${PATH}" + else + PATH="${SOFTWARE_FOLDER}:${PATH}" + fi + # Load custom configuration of software + if [ -e "${SOFTWARE_FOLDER}/ide-config" ] + then + # shellcheck disable=SC1090 + source "${SOFTWARE_FOLDER}/ide-config" + fi fi done diff --git a/scripts/src/main/resources/scripts/environment-project.bat b/scripts/src/main/resources/scripts/environment-project.bat index 93c6e468d..f47cda1e8 100644 --- a/scripts/src/main/resources/scripts/environment-project.bat +++ b/scripts/src/main/resources/scripts/environment-project.bat @@ -34,14 +34,16 @@ if not exist "%SETTINGS_PATH%" ( ) setlocal EnableDelayedExpansion for /f "delims=" %%i in ('dir /a:d /b "%SOFTWARE_PATH%\*.*"') do ( - if exist "%SOFTWARE_PATH%\%%i\bin" ( - set "IDE_PATH=%SOFTWARE_PATH%\%%i\bin;!IDE_PATH!" - ) else ( - set "IDE_PATH=%SOFTWARE_PATH%\%%i;!IDE_PATH!" - ) - rem Load custom configuration of software - if exist "%SOFTWARE_PATH%\%%i\ide-config.bat" ( - call "%SOFTWARE_PATH%\%%i\ide-config.bat" + if not "%%i" == "extra" ( + if exist "%SOFTWARE_PATH%\%%i\bin" ( + set "IDE_PATH=%SOFTWARE_PATH%\%%i\bin;!IDE_PATH!" + ) else ( + set "IDE_PATH=%SOFTWARE_PATH%\%%i;!IDE_PATH!" + ) + rem Load custom configuration of software + if exist "%SOFTWARE_PATH%\%%i\ide-config.bat" ( + call "%SOFTWARE_PATH%\%%i\ide-config.bat" + ) ) ) (