From 4b31874a563afee7420a03113b0f4e384bc3a332 Mon Sep 17 00:00:00 2001 From: Luis Blanco Date: Wed, 4 Jan 2023 19:23:43 +0400 Subject: [PATCH] Use gz --- include/snippets.md | 2 +- utils/action-pack.js | 4 ++-- utils/install.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/snippets.md b/include/snippets.md index 79ee638..429da85 100644 --- a/include/snippets.md +++ b/include/snippets.md @@ -6,7 +6,7 @@ In **package.json** use the `"postinstall"` script to download the libraries. For example the following structure might work. Note that **Addon Tools** will -append any given URL with `/${getPlatform()}.gzip` +append any given URL with `/${getPlatform()}.gz` In **package.json**: diff --git a/utils/action-pack.js b/utils/action-pack.js index 294fc56..81d91c5 100644 --- a/utils/action-pack.js +++ b/utils/action-pack.js @@ -8,8 +8,8 @@ const { getPlatform, getBin } = require('../include'); const actionPack = async () => { try { - await exec(`cd ${getBin()} && tar -acf ../${getPlatform()}.gzip *`); - console.log(`pack=${getPlatform()}.gzip`); + await exec(`cd ${getBin()} && tar -czf ../${getPlatform()}.gz *`); + console.log(`pack=${getPlatform()}.gz`); } catch (error) { console.error(error); process.exit(-1); diff --git a/utils/install.js b/utils/install.js index 25d6ce9..5fabff0 100644 --- a/utils/install.js +++ b/utils/install.js @@ -47,7 +47,7 @@ const installRecursive = async (url, count = 1) => { await rmdir(getBin()); await mkdir(getBin()); - const packPath = `${getBin()}/${getPlatform()}.gzip`; + const packPath = `${getBin()}/${getPlatform()}.gz`; await new Promise((res, rej) => { const packWriter = fs.createWriteStream(packPath); @@ -66,7 +66,7 @@ const installRecursive = async (url, count = 1) => { const install = (folder) => { - const url = `${folder}/${getPlatform()}.gzip`; + const url = `${folder}/${getPlatform()}.gz`; installRecursive(url).then(); };