Skip to content

Commit

Permalink
devonfw#849: updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedagdmoun committed Aug 30, 2022
1 parent 8c63e16 commit ca1c2e7
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions scripts/src/main/resources/scripts/command/gcviewer
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,40 @@ function doSetup(){

do_not_extract="Not Empty"
doInstall "-" "${GCVIEWER_HOME}" "gcviewer" "${GCVIEWER_VERSION}" "" "" "" "" "" "" "${do_not_extract}"
doCreateGCViewerScript

}

function doStart(){

if [ ! -d "${GCVIEWER_HOME}" ]
if [ ! -d "${GCVIEWER_HOME}" ]
then
doSetup
else
cd "${GCVIEWER_HOME}"
doEcho "Checking if Java is installed..."
doDevonCommand "java"
doDevonCommand java setup silent
doEcho "Starting GCViewer..."
doRunCommand "java -jar gcviewer*.jar&"
doRunGCViewer
fi

}

doCreateGCViewerScript(){

cd "${GCVIEWER_HOME}"
touch gcviewer-script
echo -e "#!/usr/bin/env bash\n\njava -jar gcviewer*.jar&" >> gcviewer-script
chmod +x gcviewer-script

}

doRunGCViewer(){

cd "${GCVIEWER_HOME}"
gcviewer-script

}


# CLI
case ${1} in
Expand Down

0 comments on commit ca1c2e7

Please sign in to comment.