generated from ztimson/template
Track download progress
This commit is contained in:
@@ -146,6 +146,9 @@ function resolveArchiveName() {
|
||||
}
|
||||
|
||||
async function install() {
|
||||
if (fs.existsSync(BIN_DIR) && (await fs.promises.readdir(BIN_DIR)).some(f => f.startsWith('kiwix-')))
|
||||
return console.log(`Already installed: ${BIN_DIR}`);
|
||||
|
||||
const {archiveName, ext} = resolveArchiveName();
|
||||
const url = `${BASE_URL}/${archiveName}`;
|
||||
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'kiwix-install-'));
|
||||
|
||||
Reference in New Issue
Block a user