Skip to content

Commit

Permalink
devonfw#781: check if template is already installed
Browse files Browse the repository at this point in the history
  • Loading branch information
hohwille committed Jun 9, 2022
1 parent 4846100 commit 06d55e6
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion scripts/src/main/resources/scripts/command/dotnet
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 06d55e6

Please sign in to comment.