From c69f71f956fb16ad0f8f018fe4655a23edb20f44 Mon Sep 17 00:00:00 2001 From: christofluethi Date: Wed, 12 Jun 2024 10:54:31 +0200 Subject: [PATCH] fix update script. --- update-quarkus.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/update-quarkus.sh b/update-quarkus.sh index 41886761..3d1fad10 100755 --- a/update-quarkus.sh +++ b/update-quarkus.sh @@ -6,12 +6,18 @@ version=unset project=unset diffonly=unset +REQ=(xsltproc quarkus mvn git getopt) + +for R in ${REQ[@]}; do + command -v ${R} >/dev/null 2>&1 || { echo >&2 "This script requires '${R}' but it's not installed. Aborting."; exit 1; } +done + usage() { >&2 cat << EOF Usage: $0 [ -p | --project input (e.g. quarkus-rest-data-consumer) ] [ -v | --version input (e.g. 3.11.0) ] - [ -d | --diff ] + [ -d | --diffonly ] [ -h | --help ] EOF exit 1 @@ -28,7 +34,7 @@ run_diff() { done } -args=$(getopt -a -o p:v:dh --long project:,version:,diff,help -- "$@") +args=$(getopt -a -o p:v:dh --long project:,version:,diffonly,help -- "$@") if [[ $? -gt 0 ]]; then usage fi