autoupdating generator script: userdef cache dir (#3631)

with this addition the script should be able to store the jars at a user-defined folder if desired
This commit is contained in:
Ronny Pfannschmidt 2019-08-17 05:42:57 +02:00 committed by William Cheng
parent 7e8c7db798
commit aa4ead2a6d

View File

@ -42,7 +42,7 @@ artifactid=openapi-generator-cli
ver=${OPENAPI_GENERATOR_VERSION:-$(latest.tag $ghrepo)}
jar=${artifactid}-${ver}.jar
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DIR=${OPENAPI_GENERATOR_DOWLOAD_CACHE_DIR:-"$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"}
if [ ! -f ${DIR}/${jar} ]; then
repo="central::default::https://repo1.maven.org/maven2/"