Skip to content

Commit e7f0e0b

Browse files
committed
Fix fetching of pre-built submodules not working
1 parent bf4ad92 commit e7f0e0b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

scripts/fetch-or-build-modules.mjs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const modulesConfig = [
1414
forceBuild: false,
1515
name: "reader",
1616
key: "pdfReader",
17-
URLpath: "client-pdf-reader",
17+
URLpath: "reader",
1818
buildPath: ["build", "web"],
1919
exec: (url, filename, tmpDir, targetDir) =>
2020
`cd ${tmpDir}` +
@@ -28,7 +28,7 @@ const modulesConfig = [
2828
forceBuild: false,
2929
name: "pdf-worker",
3030
key: "pdfWorker",
31-
URLpath: "client-pdf-worker",
31+
URLpath: "document-worker",
3232
buildPath: ["build"],
3333
exec: (url, filename, tmpDir, targetDir) =>
3434
`cd ${tmpDir}` +
@@ -40,19 +40,20 @@ const modulesConfig = [
4040
forceBuild: false,
4141
name: "note-editor",
4242
key: "noteEditor",
43-
URLpath: "client-note-editor",
43+
URLpath: "note-editor",
4444
buildPath: ["build", "web"],
4545
exec: (url, filename, tmpDir, targetDir) =>
4646
`cd ${tmpDir}` +
4747
` && (test -f ${filename} || curl -f ${url} -o ${filename})` +
48-
` && unzip ${filename} zotero/* -d ${targetDir}` +
49-
` && mv ${join(targetDir, "zotero", "*")} ${targetDir}`,
48+
` && unzip ${filename} web/* -d ${targetDir}` +
49+
` && mv ${join(targetDir, "web", "*")} ${targetDir}`,
5050
},
5151
];
5252

5353
async function fetchModule({ actualHash, moduleConfig, tmpDir, targetDir }) {
5454
const filename = actualHash + ".zip";
5555
const url = buildsURL + moduleConfig.URLpath + "/" + filename;
56+
console.log(`Fetching ${moduleConfig.name} from ${url}`);
5657

5758
await fs.remove(targetDir);
5859
await fs.ensureDir(targetDir);

0 commit comments

Comments
 (0)