This commit is contained in:
Luis Blanco 2023-01-04 19:23:43 +04:00
parent 3f306a4938
commit 4b31874a56
3 changed files with 5 additions and 5 deletions

View File

@ -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**:

View File

@ -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);

View File

@ -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();
};