Skip to content

Commit

Permalink
#416: create meta file in the users directory on setup (#429)
Browse files Browse the repository at this point in the history
  • Loading branch information
suprishi authored Jul 7, 2020
1 parent ccb553d commit b756cf8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions scripts/src/main/resources/scripts/command/ide
Original file line number Diff line number Diff line change
Expand Up @@ -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]"
Expand Down Expand Up @@ -149,6 +162,7 @@ function doUpdateCli() {

function doSetup() {
doUpdateCli
doUpdateMetaFile
doUpdateSettings "${@}"
if [ ! -f "${SETTINGS_PATH}/devon.properties" ]
then
Expand Down

0 comments on commit b756cf8

Please sign in to comment.