Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Try to find the candidate from the possible list.

  • Loading branch information...
commit 23d3b3cc95e722e7019ab386801446747c7657f0 1 parent d0d9263
@beckje01 beckje01 authored
Showing with 13 additions and 0 deletions.
  1. +13 −0 src/main/resources/extensions/gvm-switch.sh
View
13 src/main/resources/extensions/gvm-switch.sh
@@ -2,6 +2,19 @@
function __gvmtool_switch {
CANDIDATE="$1"
+ if [[ -z "$1" ]]; then
+ if [[ -f application.properties ]]; then
+ $(IFS=" ")
+ POSSIBLE_CANDIDATES=( $(cat application.properties | grep "app\..*\.version" | sed 's/app.//' | sed 's/.version.*//g') )
+ for c in "${POSSIBLE_CANDIDATES[@]}"
+ do
+ if [[ "$GVM_CANDIDATES_CSV" == *"${c}"* ]]; then
+ CANDIDATE="${c}"
+ fi
+ done
+ fi
+ fi
+
if [[ -z "$CANDIDATE" ]]; then
echo "No candidate provided."
else
Please sign in to comment.
Something went wrong with that request. Please try again.