src/Pure/Admin/build_scala.scala
changeset 76327 f70b015e4ac1
parent 76176 d6bd84eb94a3
child 76518 b30b8e23383c
equal deleted inserted replaced
76326:a39fa81929d4 76327:f70b015e4ac1
   121 SCALA_HOME="$COMPONENT"
   121 SCALA_HOME="$COMPONENT"
   122 SCALA_INTERFACES="$SCALA_HOME/lib/""" + interfaces + """"
   122 SCALA_INTERFACES="$SCALA_HOME/lib/""" + interfaces + """"
   123 """ + terminate_lines(classpath.map(jar => "classpath \"$SCALA_HOME/lib/" + jar + "\"")))
   123 """ + terminate_lines(classpath.map(jar => "classpath \"$SCALA_HOME/lib/" + jar + "\"")))
   124 
   124 
   125 
   125 
       
   126     /* adhoc changes */
       
   127 
       
   128     val patched_scripts = List("bin/scala", "bin/scalac")
       
   129     for (name <- patched_scripts) {
       
   130       File.change(component_dir + Path.explode(name)) {
       
   131         _.replace(""""-Dscala.home=$PROG_HOME"""", """"-Dscala.home=\"$PROG_HOME\""""")
       
   132       }
       
   133     }
       
   134 
       
   135 
   126     /* README */
   136     /* README */
   127 
   137 
   128     File.write(component_dir + Path.basic("README"),
   138     File.write(component_dir + Path.basic("README"),
   129       "This distribution of Scala integrates the following parts:\n\n" +
   139       "This distribution of Scala integrates the following parts:\n\n" +
   130       (main_download :: lib_downloads).map(_.print).mkString("\n\n") + """
   140       (main_download :: lib_downloads).map(_.print).mkString("\n\n") + """
       
   141 
       
   142 Minor changes to """ + patched_scripts.mkString(" and ") + """ allow an installation location
       
   143 with spaces in the directory name.
   131 
   144 
   132 
   145 
   133         Makarius
   146         Makarius
   134         """ + Date.Format.date(Date.now()) + "\n")
   147         """ + Date.Format.date(Date.now()) + "\n")
   135   }
   148   }