includes translations

This commit is contained in:
Joseph Garrone
2021-02-28 18:40:57 +01:00
parent f70625bf3f
commit cd145b42d6
20 changed files with 8709 additions and 33 deletions

View File

@ -0,0 +1,22 @@
import { basename as pathBasename } from "path";
import child_process from "child_process";
import fs from "fs";
export function downloadAndUnzip(
params: {
url: string;
destDirPath: string;
}
) {
const { url, destDirPath } = params;
fs.mkdirSync(destDirPath, { "recursive": true });
[
`wget ${url}`,
...["unzip", "rm"].map(prg => `${prg} ${pathBasename(url)}`),
].forEach(cmd => child_process.execSync(cmd, { "cwd": destDirPath }));
}