deploy: ignore dir in input to copy

This commit is contained in:
Christopher Monsanto
2020-08-07 05:08:07 -04:00
parent 9bc86aefe8
commit 80c00d6eba

View File

@@ -36,8 +36,13 @@ program
for (const file of files) {
const src = pathlib.path(file);
const result = scr.runOnFile(src);
const dst = pathlib.join(outputDir, pathlib.path(src, result));
const input = pathlib.update(src, {dir: ""});
const result = scr.runOnFile(input);
if (result === undefined) {
throw new Error(`undefined output on ${file}`);
}
const output = pathlib.path(input, result);
const dst = pathlib.join(outputDir, output);
aq.copy(src, dst);
}