Created
January 25, 2013 08:05
-
-
Save broqdev/4632657 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- install2.js 2013-01-25 15:32:38.358227000 +0800 | |
| +++ install.js 2013-01-25 14:29:55.639011700 +0800 | |
| @@ -108,7 +108,9 @@ | |
| unzipStream.on('error', finishIt) | |
| unzipStream.on('close', finishIt) | |
| - var readStream = fs.createReadStream(downloadedFile) | |
| + var zipPath = path.normalize('d:/node/phantomjs-1.8.0-windows.zip') | |
| + var readStream = fs.createReadStream(zipPath) | |
| + //var readStream = fs.createReadStream(downloadedFile) | |
| readStream.pipe(unzipStream) | |
| readStream.on('error', finishIt) | |
| readStream.on('close', function () { console.log('Read stream closed')}) | |
| @@ -127,6 +129,8 @@ | |
| rimraf(libPath) | |
| mkdir(downloadedFile) | |
| + extractIt() | |
| +/* | |
| var outFile = fs.openSync(downloadedFile, 'w') | |
| function onData(data) { | |
| @@ -161,6 +165,7 @@ | |
| var client = http.get(getOptions(), onResponse) | |
| console.log('Requesting ' + downloadedFile) | |
| +*/ | |
| } | |
| fetchIt() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment