changeset 924:cc94fc43b908

Made idempotent application of Gradle settings.
author Oleksandr Gavenko <gavenkoa@gmail.com>
date Mon, 29 Apr 2019 03:21:23 +0300
parents 61a376988028
children 17e0162e0d00
files .env
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/.env	Sat Mar 23 15:50:48 2019 +0200
+++ b/.env	Mon Apr 29 03:21:23 2019 +0300
@@ -74,10 +74,17 @@
 
 export PYTHONSTARTUP=$HOME/.pystartup
 
-GRADLE_OPTS='-Dorg.gradle.daemon=true'
+xopt='-Dorg.gradle.daemon=true'
+if [[ $GRADLE_OPTS != *${xopt}* ]]; then
+    GRADLE_OPTS="$GRADLE_OPTS ${xopt}"
+fi
 if [[ $OSTYPE = cygwin ]]; then
-    GRADLE_OPTS="$GRADLE_OPTS -Dorg.gradle.console=verbose"
+    xopt='-Dorg.gradle.console=verbose'
+    if [[ $GRADLE_OPTS != *${xopt}* ]]; then
+        GRADLE_OPTS="$GRADLE_OPTS ${xopt}"
+    fi
 fi
+# GRADLE_OPTS="$GRADLE_OPTS -Djava.io.tmpdir=c:/tmp"
 export GRADLE_OPTS
 
 if [[ ! :$PATH: =~ :$HOME/.npm-packages/bin: ]]; then
@@ -86,3 +93,4 @@
 
 export RLWRAP_HOME=$HOME/.rlwrap
 
+unset xopt