From 539660d4f763f05707b5602fa6f8b5d32e530f61 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 26 Feb 2015 13:22:34 -0500 Subject: [PATCH] [dsf-gdb] gdb download script: add examples and print help if unsupported version is given I got a feedback that the error message when passing an unsupported version should be more helpful. Change-Id: I3c925c500d6de787ca9bfce421eda6109e9f6415 Signed-off-by: Simon Marchi --- .../scripts/download-build-gdb.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/scripts/download-build-gdb.sh b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/scripts/download-build-gdb.sh index e2d83ec9b76..6d5c2f5be2f 100755 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/scripts/download-build-gdb.sh +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/scripts/download-build-gdb.sh @@ -56,6 +56,12 @@ function help_and_exit() { echo "Supported versions:" echo " ${default_versions}" echo "" + echo "Examples:" + echo " Build versions 7.7.1 and 7.8.2:" + echo " $ $0 7.7.1 7.8.2" + echo " Build all supported versions:" + echo " $ $0 all" + echo "" exit $1 } @@ -80,8 +86,9 @@ function check_supported() { # Supported, do nothing. ;; *) - echo "Version ${version} is not supported, sorry." - exit 1 + echo "Error: version ${version} is not supported by this script." + echo "" + help_and_exit ;; esac }