separate path file

This commit is contained in:
Mathias Buus 2014-11-15 10:21:07 +01:00
parent 8f5714396a
commit 99aa39b854
2 changed files with 3 additions and 1 deletions

View file

@ -1,3 +1,4 @@
var fs = require('fs') var fs = require('fs')
var path = require('path') var path = require('path')
module.exports = fs.readFileSync(path.join(__dirname, 'run.bat'), 'utf-8').slice(1,-1)
module.exports = fs.readFileSync(path.join(__dirname, 'path.txt'), 'utf-8')

View file

@ -32,6 +32,7 @@ if (!paths[platform]) throw new Error('Unknown platform: '+platform)
nugget(url, {target:name, dir:__dirname, resume:true, verbose:true}, function(err) { nugget(url, {target:name, dir:__dirname, resume:true, verbose:true}, function(err) {
if (err) return onerror(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'), '"'+paths[platform]+'" '+argv[platform])
extract(path.join(__dirname, name), {dir:path.join(__dirname, 'dist')}, function(err) { extract(path.join(__dirname, name), {dir:path.join(__dirname, 'dist')}, function(err) {
if (err) return onerror(err) if (err) return onerror(err)