src/Pure/System/linux.scala
changeset 79515 fa581264522e
parent 79487 47272fac86d8
child 80158 059d5e115ae3
equal deleted inserted replaced
79514:9204c034a5bf 79515:fa581264522e
   143 
   143 
   144   def generate_password(length: Int = 10): String = {
   144   def generate_password(length: Int = 10): String = {
   145     require(length >= 6, "password too short")
   145     require(length >= 6, "password too short")
   146     Isabelle_System.bash("pwgen " + length + " 1").check.out
   146     Isabelle_System.bash("pwgen " + length + " 1").check.out
   147   }
   147   }
       
   148 
       
   149 
       
   150   /* PHP */
       
   151 
       
   152   def php_version(): String =
       
   153     Isabelle_System.bash("""php --run 'echo PHP_MAJOR_VERSION . "." . PHP_MINOR_VERSION;'""")
       
   154       .check.out
       
   155 
       
   156   def php_conf_dir(name: String): Path =
       
   157     Path.explode("/etc/php") + Path.basic(php_version()) + Path.basic(name) + Path.explode("conf.d")
   148 }
   158 }