From c18dd33c53f2c5c2362734ebc2335e2c78654120 Mon Sep 17 00:00:00 2001 From: Serge Guzik Date: Sat, 16 Feb 2019 13:25:36 +0200 Subject: [PATCH] feat: Add ability to override cache location with environment variable --- warp4j | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/warp4j b/warp4j index 5c9932c..9143ad0 100755 --- a/warp4j +++ b/warp4j @@ -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