From d8432fe081886d5e8302bf861843483650a3851e Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Tue, 25 Jul 2017 07:41:16 -0400 Subject: [PATCH] make announce.sh nicer to use by hand Periodically when we have an announcement failure someone has to run announce.sh by hand. This change makes that a little nicer by waiting until after the argument validation is done to "set -x" so that the usage message for missing arguments is printed more cleanly. Change-Id: I2081b28315fd2272399b10e98e7bd390f6bc970e Signed-off-by: Doug Hellmann --- announce.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/announce.sh b/announce.sh index 0663556..3557e36 100755 --- a/announce.sh +++ b/announce.sh @@ -16,7 +16,7 @@ # License for the specific language governing permissions and limitations # under the License. -set -ex +set -e if [ $# -lt 1 ]; then echo "Usage: $0 path-to-repository [version]" @@ -26,6 +26,8 @@ if [ $# -lt 1 ]; then exit 2 fi +set -x + TOOLSDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source $TOOLSDIR/functions