equal
deleted
inserted
replaced
127 |
127 |
128 val (output, rc) = process_output(process(cmd, env = env, redirect = true)) |
128 val (output, rc) = process_output(process(cmd, env = env, redirect = true)) |
129 if (rc != 0) error(output) |
129 if (rc != 0) error(output) |
130 |
130 |
131 val entries = |
131 val entries = |
132 (for (entry <- File.read(dump).split("\u0000") if entry != "") yield { |
132 (for (entry <- Library.split_strings0(File.read(dump)) if entry != "") yield { |
133 val i = entry.indexOf('=') |
133 val i = entry.indexOf('=') |
134 if (i <= 0) entry -> "" |
134 if (i <= 0) entry -> "" |
135 else entry.substring(0, i) -> entry.substring(i + 1) |
135 else entry.substring(0, i) -> entry.substring(i + 1) |
136 }).toMap |
136 }).toMap |
137 entries + ("PATH" -> entries("PATH_JVM")) - "PATH_JVM" |
137 entries + ("PATH" -> entries("PATH_JVM")) - "PATH_JVM" |
181 /** file-system operations **/ |
181 /** file-system operations **/ |
182 |
182 |
183 /* scala functions */ |
183 /* scala functions */ |
184 |
184 |
185 private def apply_paths(arg: String, fun: List[Path] => Unit): String = |
185 private def apply_paths(arg: String, fun: List[Path] => Unit): String = |
186 { fun(Library.space_explode('\u0000', arg).map(Path.explode)); "" } |
186 { fun(Library.split_strings0(arg).map(Path.explode)); "" } |
187 |
187 |
188 private def apply_paths1(arg: String, fun: Path => Unit): String = |
188 private def apply_paths1(arg: String, fun: Path => Unit): String = |
189 apply_paths(arg, { case List(path) => fun(path) }) |
189 apply_paths(arg, { case List(path) => fun(path) }) |
190 |
190 |
191 private def apply_paths2(arg: String, fun: (Path, Path) => Unit): String = |
191 private def apply_paths2(arg: String, fun: (Path, Path) => Unit): String = |
566 |
566 |
567 object Download extends Scala.Fun("download") |
567 object Download extends Scala.Fun("download") |
568 { |
568 { |
569 val here = Scala_Project.here |
569 val here = Scala_Project.here |
570 def apply(arg: String): String = |
570 def apply(arg: String): String = |
571 Library.space_explode('\u0000', arg) match { |
571 Library.split_strings0(arg) match { |
572 case List(url, file) => download(url, Path.explode(file)); "" |
572 case List(url, file) => download(url, Path.explode(file)); "" |
573 } |
573 } |
574 } |
574 } |
575 } |
575 } |