src/Pure/System/isabelle_system.scala
changeset 73525 419edc7f3726
parent 73523 2cd23d587db9
child 73547 a7aabdf889b7
equal deleted inserted replaced
73524:c52d819499a1 73525:419edc7f3726
   187   }
   187   }
   188 
   188 
   189 
   189 
   190   /* Isabelle distribution identification */
   190   /* Isabelle distribution identification */
   191 
   191 
   192   def isabelle_id(root: Path = Path.ISABELLE_HOME): Option[String] =
   192   def isabelle_id(root: Path = Path.ISABELLE_HOME): String =
   193     getetc("ISABELLE_ID", root = root) orElse Mercurial.archive_id(root) orElse {
   193     getetc("ISABELLE_ID", root = root) orElse Mercurial.archive_id(root) getOrElse {
   194       if (Mercurial.is_repository(root)) Some(Mercurial.repository(root).parent())
   194       if (Mercurial.is_repository(root)) Mercurial.repository(root).parent()
   195       else None
   195       else error("Failed to identify Isabelle distribution " + root)
   196     }
   196     }
   197 
   197 
   198   object Isabelle_Id extends Scala.Fun("isabelle_id")
   198   object Isabelle_Id extends Scala.Fun("isabelle_id")
   199   {
   199   {
   200     val here = Scala_Project.here
   200     val here = Scala_Project.here
   201     def apply(arg: String): String = isabelle_id().get
   201     def apply(arg: String): String = isabelle_id()
   202   }
   202   }
   203 
   203 
   204   def isabelle_tags(root: Path = Path.ISABELLE_HOME): String =
   204   def isabelle_tags(root: Path = Path.ISABELLE_HOME): String =
   205     getetc("ISABELLE_TAGS", root = root) orElse Mercurial.archive_tags(root) getOrElse {
   205     getetc("ISABELLE_TAGS", root = root) orElse Mercurial.archive_tags(root) getOrElse {
   206       if (Mercurial.is_repository(root)) {
   206       if (Mercurial.is_repository(root)) {