[cli][script] Fix misspelling in cli bootstrapping script (#4356)

This commit is contained in:
Jim Schubert 2019-11-03 16:47:22 -05:00 committed by GitHub
parent 61d7d22b24
commit b536119162
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,7 +22,7 @@ set -o pipefail
for cmd in {mvn,jq,curl}; do
if ! command -v ${cmd} > /dev/null; then
>&2 echo "This script requires '${cmd}' to be installed."
>&2 echo "This script requires '${cmd}' to be installed."
exit 1
fi
done
@ -42,7 +42,18 @@ artifactid=openapi-generator-cli
ver=${OPENAPI_GENERATOR_VERSION:-$(latest.tag $ghrepo)}
jar=${artifactid}-${ver}.jar
DIR=${OPENAPI_GENERATOR_DOWLOAD_CACHE_DIR:-"$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"}
# TODO: Remove OPENAPI_GENERATOR_DOWLOAD_CACHE_DIR for release 5.0
if [ -n "${OPENAPI_GENERATOR_DOWLOAD_CACHE_DIR}" ]; then
>&2 printf "[WARN] Variable OPENAPI_GENERATOR_DOWLOAD_CACHE_DIR is misspelled.\nPlease change to OPENAPI_GENERATOR_DOWNLOAD_CACHE_DIR. This option will be removed in the 5.0 release.\n"
fi
cachedir=${OPENAPI_GENERATOR_DOWNLOAD_CACHE_DIR:-"$OPENAPI_GENERATOR_DOWLOAD_CACHE_DIR"}
DIR=${cachedir:-"$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"}
if [ ! -d "${DIR}" ]; then
mkdir -p "${DIR}"
fi
if [ ! -f ${DIR}/${jar} ]; then
repo="central::default::https://repo1.maven.org/maven2/"