\#28: Fix Linux upgrade

This commit is contained in:
Scott E. Graves
2019-07-04 17:42:48 -05:00
parent 0d524376d1
commit a2c66f1047
6 changed files with 27 additions and 21 deletions

View File

@@ -16,7 +16,6 @@ require.extensions['.sh'] = function (module, filename) {
module.exports = fs.readFileSync(filename, 'utf8');
};
const detectScript = require('./detect_linux.sh');
const installScript = require('./update_linux.sh');
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
@@ -747,11 +746,8 @@ ipcMain.on(Constants.IPC_Install_Upgrade, (event, data) => {
args = ['-a', 'Finder', data.Source];
} else if (platform === 'linux') {
try {
const execPath = path.join(os.tmpdir(), 'install_linux.sh');
fs.writeFileSync(execPath, installScript);
fs.chmodSync(execPath, '750');
command = execPath;
args = [data.Source];
command = data.Source;
fs.chmodSync(command, '750');
} catch (e) {
errorHandler(e);
}

View File

@@ -1,8 +0,0 @@
#!/bin/sh
sleep 5
chmod +x "$1"
"$1"&
sleep 1
rm -f "$0"