|
27919
|
1 |
/* Title: Pure/Tools/isabelle_system.scala
|
|
|
2 |
ID: $Id$
|
|
|
3 |
Author: Makarius
|
|
|
4 |
|
|
|
5 |
Isabelle system support.
|
|
|
6 |
*/
|
|
|
7 |
|
|
|
8 |
package isabelle
|
|
|
9 |
|
|
|
10 |
|
|
|
11 |
object IsabelleSystem {
|
|
|
12 |
|
|
|
13 |
/* Isabelle settings */
|
|
|
14 |
|
|
|
15 |
class BadSetting(val name: String) extends Exception
|
|
|
16 |
|
|
|
17 |
private def strict_getenv(name: String) = {
|
|
|
18 |
val value = System.getenv(name)
|
|
|
19 |
if (value == null || value == "") throw new BadSetting(name)
|
|
|
20 |
else value
|
|
|
21 |
}
|
|
|
22 |
|
|
|
23 |
def ISABELLE_HOME() = strict_getenv("ISABELLE_HOME_JVM")
|
|
|
24 |
def ISABELLE_HOME_USER() = strict_getenv("ISABELLE_HOME_USER_JVM")
|
|
|
25 |
|
|
|
26 |
}
|