Skip to content

Commit

Permalink
fix update script.
Browse files Browse the repository at this point in the history
  • Loading branch information
christofluethi committed Jun 12, 2024
1 parent ef8bbe8 commit c69f71f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions update-quarkus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit c69f71f

Please sign in to comment.