Browse Source

Make download-jdks.sh travis' BUILD_XYZ environment vars aware, so we cut build time and disk usage

MeFisto94 7 years ago
parent
commit
98f8525f8e
1 changed files with 19 additions and 5 deletions
  1. 19 5
      jdks/download-jdks.sh

+ 19 - 5
jdks/download-jdks.sh

@@ -275,9 +275,23 @@ mkdir -p local/$jdk_version-$jdk_build_version/compiled
 
 cd local/$jdk_version-$jdk_build_version
 
-build_mac_jdk
-build_other_jdk windows x86 i586
-build_other_jdk windows x64 x64
-build_other_jdk linux x86 i586
-build_other_jdk linux x64 x64
+if [ "x$TRAVIS" != "x" ]; then
+    if [ "x$BUILD_X64" != "x" ]; then
+        build_other_jdk windows x64 BUILD_X64
+        build_other_jdk linux x64 x64
+    fi
+    if [ "x$BUILD_X86" != "x" ]; then
+        build_other_jdk windows x86 i586
+        build_other_jdk linux x86 i586
+    fi
+    if [ "x$BUILD_OTHER" != "x" ]; then
+        build_mac_jdk
+    fi
+else
+    build_mac_jdk
+    build_other_jdk windows x86 i586
+    build_other_jdk windows x64 x64
+    build_other_jdk linux x86 i586
+    build_other_jdk linux x64 x64
+fi
 cd ../../