mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 13:07:02 +00:00
39 lines
907 B
JavaScript
39 lines
907 B
JavaScript
require("../common.jake");
|
|
|
|
const fs = require("fs");
|
|
const path = require("path");
|
|
const utilsFile = ObjectiveJ.utils.file;
|
|
|
|
var tmp_list = new FileList();
|
|
tmp_list.include("**/*");
|
|
tmp_list.exclude("Jakefile");
|
|
|
|
tmp_list.forEach(function(aFilename)
|
|
{
|
|
if (!fs.lstatSync(aFilename).isFile())
|
|
return;
|
|
|
|
var buildFilename = path.join($BUILD_CJS_CAPPUCCINO, aFilename);
|
|
|
|
filedir (buildFilename, [aFilename], function ()
|
|
{
|
|
utilsFile.cp(aFilename, buildFilename);
|
|
});
|
|
|
|
// HACK: narwhal should copy permissions
|
|
if (path.dirname(aFilename) === path.join("bin"))
|
|
{
|
|
filedir (buildFilename, function ()
|
|
{
|
|
fs.chmodSync(buildFilename, 0o755);
|
|
});
|
|
}
|
|
|
|
task ("build", buildFilename);
|
|
CLOBBER.include(buildFilename);
|
|
});
|
|
|
|
task ("build", function() {
|
|
setPackageMetadata(path.join($BUILD_CJS_CAPPUCCINO, "package.json"));
|
|
});
|