]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: scripts: add a "quiet" mode to publish-release
authorWilly Tarreau <w@1wt.eu>
Fri, 9 Jun 2017 13:57:31 +0000 (15:57 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 Jun 2017 13:57:31 +0000 (15:57 +0200)
Option "-q" will make it silent in automatic mode when there is nothing to do.

scripts/publish-release

index e2b22303a6ceb67fbb5a0165cd7e06ca6dae52e4..ecef867b922cae5f2a6528110871850cb161c193 100755 (executable)
@@ -8,12 +8,13 @@
 #   - copies & compresses files, changelog & docs to the final destination
 #   - shows a listing of the final file
 
-USAGE="Usage: ${0##*/} [-a] [-y] [-b branch] [-n newver] DIR"
+USAGE="Usage: ${0##*/} [-a] [-q] [-y] [-b branch] [-n newver] DIR"
 TARGET_DIR=
 OUTPUT=
 SAYYES=
 BRANCH=
 DEVEL=
+QUIET=
 AUTO=
 NEW=
 DIR=
@@ -29,13 +30,14 @@ err() {
 }
 
 quit() {
-       [ "$#" -eq 0 ] || echo "$*"
+       [ "$#" -eq 0 -o -n "$QUIET" ] || echo "$*"
        exit 0
 }
 
 while [ -n "$1" -a -z "${1##-*}" ]; do
        case "$1" in
                -a)        AUTO=1         ; shift   ;;
+               -q)        QUIET=1        ; shift   ;;
                -y)        SAYYES=1       ; shift   ;;
                -b)        BRANCH="$2"    ; shift 2 ;;
                -n)        NEW="$2"       ; shift 2 ;;