add shebang. fixes #4
This commit is contained in:
parent
cff6b91d46
commit
6af9dfc915
1 changed files with 7 additions and 1 deletions
|
@ -22,6 +22,12 @@ var paths = {
|
|||
win32: path.join(__dirname, './dist/atom.exe')
|
||||
}
|
||||
|
||||
var shebang = {
|
||||
darwin: '#!/bin/bash\n',
|
||||
linux: '#!/bin/bash\n',
|
||||
win32: ''
|
||||
}
|
||||
|
||||
var argv = {
|
||||
darwin: '"$@"',
|
||||
linux: '"$@"',
|
||||
|
@ -33,7 +39,7 @@ if (!paths[platform]) throw new Error('Unknown platform: '+platform)
|
|||
nugget(url, {target:name, 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'), '"'+paths[platform]+'" '+argv[platform])
|
||||
fs.writeFileSync(path.join(__dirname, 'run.bat'), shebang[platform]+'"'+paths[platform]+'" '+argv[platform])
|
||||
extract(path.join(__dirname, name), {dir:path.join(__dirname, 'dist')}, function(err) {
|
||||
if (err) return onerror(err)
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue