src/Pure/System/linux.scala
changeset 79515 fa581264522e
parent 79487 47272fac86d8
child 80158 059d5e115ae3
--- a/src/Pure/System/linux.scala	Mon Jan 22 22:18:20 2024 +0100
+++ b/src/Pure/System/linux.scala	Tue Jan 23 12:18:06 2024 +0100
@@ -145,4 +145,14 @@
     require(length >= 6, "password too short")
     Isabelle_System.bash("pwgen " + length + " 1").check.out
   }
+
+
+  /* PHP */
+
+  def php_version(): String =
+    Isabelle_System.bash("""php --run 'echo PHP_MAJOR_VERSION . "." . PHP_MINOR_VERSION;'""")
+      .check.out
+
+  def php_conf_dir(name: String): Path =
+    Path.explode("/etc/php") + Path.basic(php_version()) + Path.basic(name) + Path.explode("conf.d")
 }