Updates to fix building.

Reviewed by me.
This commit is contained in:
Francisco Ryan Tolmasky I committed 2009-10-08 14:59:10 -04:00
1 parent 99697926d9
commit 7864a9fa8e
2 files changed
+20 -4

No files matched your search

@@ -26,13 +26,24 @@ function compress(/*String*/ aCode, /*String*/ FIXME)
{
// FIXME: figure out why this doesn't work on Windows/Cygwin
//var tmpFile = java.io.File.createTempFile("OBJJC", "");
var tmpFile = new java.io.File("/tmp/" + FIXME + Math.random() + ".tmp");
/*var tmpFile = new java.io.File("/tmp/" + FIXME + Math.random() + ".tmp");
tmpFile.deleteOnExit();
tmpFile = tmpFile.getAbsolutePath();
*/
var tmpFile = FILE.join("/tmp", FIXME + Math.random() + ".tmp");
FILE.write(tmpFile, aCode, { charset:"UTF-8" });
return OS.command(["java", "-Dfile.encoding=UTF-8", "-classpath", [RHINO_PATH, SHRINKSAFE_PATH].join(":"), "org.dojotoolkit.shrinksafe.Main", tmpFile]);
var shrinksafe = OS.popen("java -Dfile.encoding=UTF-8 -classpath " + RHINO_PATH + ":" + SHRINKSAFE_PATH + " org.dojotoolkit.shrinksafe.Main " + tmpFile),
output = "",
chunk = "";
while (chunk = shrinksafe.stdout.read())
output += chunk;
return output;
// return OS.command(["java", "-Dfile.encoding=UTF-8", "-classpath", [RHINO_PATH, SHRINKSAFE_PATH].join(":"), "org.dojotoolkit.shrinksafe.Main", tmpFile]);
}
function compileWithResolvedFlags(aFilePath, objjcFlags, gccFlags)
+7 -2
View File
@@ -91,8 +91,13 @@ global.rm_rf = function(/*String*/ aFilename)
global.cp_r = function(/*String*/ from, /*String*/ to)
{
rm_rf(to);
FILE.copyTree(from, to);
if (FILE.exists(to))
rm_rf(to);
if (FILE.isDirectory(from))
FILE.copyTree(from, to);
else
FILE.copy(from, to);
}
global.cp = function(/*String*/ from, /*String*/ to)