# HG changeset patch # User Kim Alvefur # Date 1751557818 -7200 # Node ID c95dffd984a4cec998bbd2fcd8f86736435e24d2 # Parent 887ed0f6e2758e39d93788260a92d8291a7d16dc mod_rest: Add -v flag to example script to allow increasing verbosity diff -r 887ed0f6e275 -r c95dffd984a4 mod_rest/example/rest.sh --- a/mod_rest/example/rest.sh Thu Jul 03 17:49:08 2025 +0200 +++ b/mod_rest/example/rest.sh Thu Jul 03 17:50:18 2025 +0200 @@ -18,6 +18,7 @@ # Settings HOST="" DOMAIN="" +PRINT="b" SESSION="session-read-only" @@ -35,8 +36,21 @@ exit 1 fi -while getopts 'r:h:' flag; do +while getopts 'vr:h:' flag; do case "$flag" in + v) + case "$PRINT" in + b) + PRINT="Bb" + ;; + Bb) + PRINT="HBhb" + ;; + HBhb) + PRINT="HBhbm" + ;; + esac + ;; r) case "$OPTARG" in o) @@ -88,4 +102,4 @@ shift 1 fi -https --check-status -p b --"$SESSION" rest -A oauth2 -a "$HOST" --oauth2-scope "$SCOPE" "$HOST/rest$GET_PATH" "$@" +https --check-status -p "$PRINT" --"$SESSION" rest -A oauth2 -a "$HOST" --oauth2-scope "$SCOPE" "$HOST/rest$GET_PATH" "$@"