From b756cf8d8b036d0a550d230df008c63b66dce1aa Mon Sep 17 00:00:00 2001 From: Saptarshi Bose Date: Tue, 7 Jul 2020 14:11:28 +0530 Subject: [PATCH] #416: create meta file in the users directory on setup (#429) --- scripts/src/main/resources/scripts/command/ide | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/scripts/src/main/resources/scripts/command/ide b/scripts/src/main/resources/scripts/command/ide index c83dd39d0..e9ef1eb22 100755 --- a/scripts/src/main/resources/scripts/command/ide +++ b/scripts/src/main/resources/scripts/command/ide @@ -3,6 +3,19 @@ source "$(dirname "${0}")"/../functions DEVON_IDE_REPO_URL="https://repo.maven.apache.org/maven2/com/devonfw/tools/ide" +function doUpdateMetaFile() { + local ide_paths="${DEVON_HOME_DIR}/.devon/ide-paths" + if [ -f "${ide_paths}" ] + then + if ! grep -q "${DEVON_IDE_HOME}" "${ide_paths}" + then + echo "${DEVON_IDE_HOME}" >> "${ide_paths}" + fi + else + echo "${DEVON_IDE_HOME}" > "${ide_paths}" + fi +} + function doUpdateScripts() { # shellcheck disable=SC2007,SC2154 doUpgradeMavenArtifact "${DEVON_IDE_HOME}" "${DEVON_IDE_REPO_URL}" "devonfw-ide-scripts" "${target_version}" ".tar.gz" "$[devon_ide_version]" @@ -149,6 +162,7 @@ function doUpdateCli() { function doSetup() { doUpdateCli + doUpdateMetaFile doUpdateSettings "${@}" if [ ! -f "${SETTINGS_PATH}/devon.properties" ] then