feat: Add ability to override cache location with environment variable

This commit is contained in:
Serge Guzik 2019-02-16 13:25:36 +02:00
parent 9702fbf328
commit c18dd33c53

5
warp4j
View File

@ -265,6 +265,11 @@ case $THIS_PLATFORM in
*) CACHE_PATH="$HOME/.local/share/warp4j" ;;
esac
# cache path can be overriden with environment variable
if [[ $WARP4J_CACHE ]]; then
CACHE_PATH=$WARP4J_CACHE
fi
# this is not full path, platform name and full version will be added
JAVA_DOWNLOAD_PATH=$CACHE_PATH/$JAVA_DISTRO_TYPE/$JVM_IMPL
BUNDLES_PATH=$CACHE_PATH/bundle # prepare bundles here