replaced run.bat with cli.js closes #9
This commit is contained in:
parent
c973ebc84a
commit
0b0472a999
4 changed files with 8 additions and 16 deletions
|
@ -22,24 +22,11 @@ var paths = {
|
|||
win32: path.join(__dirname, './dist/electron.exe')
|
||||
}
|
||||
|
||||
var shebang = {
|
||||
darwin: '#!/bin/bash\n',
|
||||
linux: '#!/bin/bash\n',
|
||||
win32: ''
|
||||
}
|
||||
|
||||
var argv = {
|
||||
darwin: '"$@"',
|
||||
linux: '"$@"',
|
||||
win32: '%*' // does this work with " " in the args?
|
||||
}
|
||||
|
||||
if (!paths[platform]) throw new Error('Unknown platform: ' + platform)
|
||||
|
||||
nugget(url, {target: filename, dir: __dirname, resume: true, verbose: true}, function (err) {
|
||||
if (err) return onerror(err)
|
||||
fs.writeFileSync(path.join(__dirname, 'path.txt'), paths[platform])
|
||||
fs.writeFileSync(path.join(__dirname, 'run.bat'), shebang[platform] + '"' + paths[platform] + '" ' + argv[platform])
|
||||
extract(path.join(__dirname, filename), {dir: path.join(__dirname, 'dist')}, function (err) {
|
||||
if (err) return onerror(err)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue