# HG changeset patch # User Lars Hupel # Date 1466499223 -7200 # Node ID 7a8515c58271f8ae383bc8474426fe2ed470f2f3 # Parent 83a91a73fcb551bcf6fdaa8887a11d4d866cea40 read Java system properties from ISABELLE_CI_PROPERTIES diff -r 83a91a73fcb5 -r 7a8515c58271 src/Pure/Tools/ci_profile.scala --- a/src/Pure/Tools/ci_profile.scala Mon Jun 20 22:31:16 2016 +0200 +++ b/src/Pure/Tools/ci_profile.scala Tue Jun 21 10:53:43 2016 +0200 @@ -7,6 +7,9 @@ package isabelle +import java.util.{Properties => JProperties} + + abstract class CI_Profile extends Isabelle_Tool.Body { @@ -39,10 +42,22 @@ } } + private def load_properties(): JProperties = + { + val props = new JProperties() + val file = Path.explode(Isabelle_System.getenv_strict("ISABELLE_CI_PROPERTIES")).file + if (file.exists()) + props.load(new java.io.FileReader(file)) + props + } + override final def apply(args: List[String]): Unit = { List("ML_PLATFORM", "ML_HOME", "ML_SYSTEM", "ML_OPTIONS").foreach(print_variable) + val props = load_properties() + System.getProperties().putAll(props) + val isabelle_home = Path.explode(Isabelle_System.getenv_strict("ISABELLE_HOME")) println(s"Build for Isabelle id ${hg_id(isabelle_home)}")