\#28: Fix Linux upgrade
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
sleep 5
|
||||
chmod +x "$1"
|
||||
"$1"&
|
||||
|
||||
sleep 1
|
||||
rm -f "$0"
|
||||
Reference in New Issue
Block a user