Skip to content

Commit

Permalink
devonfw#849: changes according to PR devonfw#862 's review
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedagdmoun committed Sep 6, 2022
1 parent 397469e commit ec0e015
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 13 deletions.
1 change: 1 addition & 0 deletions documentation/cli.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ The following commandlets are currently available:
* link:docker.asciidoc[docker]
* link:dotnet.asciidoc[dotnet]
* link:eclipse.asciidoc[eclipse]
* link:gcviewer.asciidoc[gradle]
* link:graalvm.asciidoc[graalvm]
* link:gradle.asciidoc[gradle]
* link:helm.asciidoc[helm]
Expand Down
2 changes: 2 additions & 0 deletions documentation/devonfw-ide-usage.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ include::dotnet.asciidoc[leveloffset=3]

include::eclipse.asciidoc[leveloffset=3]

include::gcviewer.asciidoc[leveloffset=3]

include::graalvm.asciidoc[leveloffset=3]

include::gradle.asciidoc[leveloffset=3]
Expand Down
3 changes: 1 addition & 2 deletions documentation/gcviewer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ Currently this feature is new and therefore experimental.
It may change in incompatible ways in the next releases until we reach a stable state.
We hope that all is working fine for you.
However, do not expect everything to work out of the box.
In case you are facing issues (e.g. network problems with Cisco AnyConnect, etc.) please give us feedback so we can improve.


The arguments (`devon oc «args»`) are explained in the following table:
The arguments (`devon gcviewer «args»`) are explained in the following table:

.Usage of `devon gcviewer`
[options="header"]
Expand Down
1 change: 1 addition & 0 deletions documentation/scripts.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ This directory is the heart of the `devonfw-ide` and contains the required link:
│ ├── link:docker.asciidoc[docker]
│ ├── link:dotnet.asciidoc[dotnet]
│ ├── link:eclipse.asciidoc[eclipse]
│ ├── link:gcviewer.asciidoc[gcviewer]
│ ├── link:graalvm.asciidoc[graalvm]
│ ├── link:gradle.asciidoc[gradle]
| ├── link:helm.asciidoc[helm]
Expand Down
29 changes: 18 additions & 11 deletions scripts/src/main/resources/scripts/command/gcviewer
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,18 @@ GCVIEWER_HOME="${DEVON_IDE_HOME}/software/gcviewer"
# gcviewer installation
function doSetup(){

if [ -z "${GCVIEWER_VERSION}" ]
if [ "${1}" != "silent" ]
then
doEcho "Getting the latest release of GCViewer..."
GCVIEWER_VERSION=$(curl "https://github.com/chewiebug/GCViewer/tags" | awk -F "/tag/" '/GCViewer/ {print $2}' | sort -r | head -1 | awk -F "\">" '{print $1}')
fi

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

if [ -z "${GCVIEWER_VERSION}" ]
then
doEcho "Getting the latest release of GCViewer..."
GCVIEWER_VERSION=$(curl "https://github.com/chewiebug/GCViewer/tags" | awk -F "/tag/" '/GCViewer/ {print $2}' | sort -r | head -1 | awk -F "\">" '{print $1}')
fi
do_not_extract="Not Empty"
doInstall "-" "${GCVIEWER_HOME}" "gcviewer" "${GCVIEWER_VERSION}" "" "" "" "" "" "" "${do_not_extract}"
doCreateGCViewerScript
fi

}

function doStart(){
Expand Down Expand Up @@ -73,12 +75,17 @@ case ${1} in
echo
;;
"setup" | "s")
doSetup
if [ "${2}" == "silent" ]
then
doSetup silent
else
doSetup
fi
;;
"start" | "")
doStart
;;
*)
doError "Unkown command. Call devon gcviewer to setup or start GCViewer OR devon gcviewer help for available commands"
doError "Unkown command!"
;;
esac

0 comments on commit ec0e015

Please sign in to comment.