From 06d55e67b352dee49b1c7fdb02b8fd72ccd9d60f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Hohwiller?= Date: Thu, 9 Jun 2022 17:07:33 +0200 Subject: [PATCH] #781: check if template is already installed --- scripts/src/main/resources/scripts/command/dotnet | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/scripts/src/main/resources/scripts/command/dotnet b/scripts/src/main/resources/scripts/command/dotnet index 174d410f5..8ea740c56 100644 --- a/scripts/src/main/resources/scripts/command/dotnet +++ b/scripts/src/main/resources/scripts/command/dotnet @@ -3,13 +3,26 @@ source "$(dirname "${0}")"/../functions cd "${DEVON_IDE_HOME}" || exit 255 +function doExists() { + if [ -e "${1}" ] + then + return + else + return 255 + fi +} function doSetup() { doDevonCommand java setup silent if [ "${1}" != "silent" ] || [ ! -d "${DOTNET_HOME}" ] then doInstall "-" "${DOTNET_HOME}" "dotnet" "${DOTNET_VERSION:-6.0.300}" - doRun new -i devon4net.WebApi.Template + if doExists ~/.templateengine/packages/Devon4Net.WebAPI.Template* + then + doDebug "Devon4net template already installed." + else + doRun new -i devon4net.WebApi.Template + fi fi if [ "${1}" != "silent" ] && ! doIsQuiet then