Skip to content
Snippets Groups Projects
Commit 428cde5d authored by François Garillot's avatar François Garillot Committed by Sean Owen
Browse files

[SPARK-9250] Make change-scala-version more helpful w.r.t. valid Scala versions

Author: François Garillot <francois@garillot.net>

Closes #7595 from huitseeker/issue/SPARK-9250 and squashes the following commits:

80a0218 [François Garillot] [SPARK-9250] Make change-scala-version's usage more explicit, introduce a -h|--help option.
parent 846cf462
No related branches found
No related tags found
No related merge requests found
......@@ -19,19 +19,23 @@
set -e
VALID_VERSIONS=( 2.10 2.11 )
usage() {
echo "Usage: $(basename $0) <version>" 1>&2
echo "Usage: $(basename $0) [-h|--help] <version>
where :
-h| --help Display this help text
valid version values : ${VALID_VERSIONS[*]}
" 1>&2
exit 1
}
if [ $# -ne 1 ]; then
if [[ ($# -ne 1) || ( $1 == "--help") || $1 == "-h" ]]; then
usage
fi
TO_VERSION=$1
VALID_VERSIONS=( 2.10 2.11 )
check_scala_version() {
for i in ${VALID_VERSIONS[*]}; do [ $i = "$1" ] && return 0; done
echo "Invalid Scala version: $1. Valid versions: ${VALID_VERSIONS[*]}" 1>&2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment