mirror of
https://github.com/jely2002/youtube-dl-gui.git
synced 2021-11-01 22:46:21 +03:00
Remove execa dependency from appimage-fix.js
This commit is contained in:
@@ -11,7 +11,7 @@ function isLinux (targets) {
|
|||||||
|
|
||||||
async function afterPack ({targets, appOutDir}) {
|
async function afterPack ({targets, appOutDir}) {
|
||||||
if ( !isLinux ( targets ) ) return;
|
if ( !isLinux ( targets ) ) return;
|
||||||
const scriptPath = path.join(appOutDir, 'youtube-dl-gui'),
|
const scriptPath = path.join(appOutDir, appName),
|
||||||
script = '#!/bin/bash\n"${BASH_SOURCE%/*}"/' + appName + '.bin "$@" --no-sandbox';
|
script = '#!/bin/bash\n"${BASH_SOURCE%/*}"/' + appName + '.bin "$@" --no-sandbox';
|
||||||
new Promise((resolve) => {
|
new Promise((resolve) => {
|
||||||
const child = child_process.exec(`mv ${appName} ${appName}.bin`, {cwd: appOutDir});
|
const child = child_process.exec(`mv ${appName} ${appName}.bin`, {cwd: appOutDir});
|
||||||
@@ -19,7 +19,7 @@ async function afterPack ({targets, appOutDir}) {
|
|||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
fs.writeFileSync (scriptPath, script);
|
fs.writeFileSync(scriptPath, script);
|
||||||
child_process.exec(`chmod +x ${appName}`, {cwd: appOutDir});
|
child_process.exec(`chmod +x ${appName}`, {cwd: appOutDir});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user