1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 17:35:35 +02:00

[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 <simon.marchi@polymtl.ca>
This commit is contained in:
Simon Marchi 2015-02-26 13:22:34 -05:00 committed by Gerrit Code Review @ Eclipse.org
parent 2ec6e11b2b
commit 539660d4f7

View file

@ -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
}