Skip to content

Commit

Permalink
Print log of extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
kelson42 committed Dec 22, 2024
1 parent 5eb2012 commit 64d521d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions download-libzim.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const urls = [
for (let url of urls) {
console.info(`Downloading Libzim from: `, url);
const filename = urlParser.parse(url).pathname.split("/").slice(-1)[0];
const dlFile = `./download/${filename}`;
const dlFile = isWindows ? `download\\${filename}` : `./download/${filename}`;

try {
fs.statSync(dlFile);
Expand All @@ -74,9 +74,9 @@ for (let url of urls) {
})
.then(() => {
const cmd = isWindows
? `unzip -v ${dlFile} -d ./download`
? `unzip.exe -v ${dlFile} -d download`
: `tar --strip-components 1 -xf ${dlFile} -C ./download`;
console.log(`Running Extract:`, `[${cmd}]`);
console.log(`Running Extract:`, `${cmd}`);
return exec(cmd);
})
.then(() => {
Expand Down

0 comments on commit 64d521d

Please sign in to comment.