Created
July 31, 2013 03:42
-
-
Save johnciacia/6119106 to your computer and use it in GitHub Desktop.
Download and extract a tarball and gunzipped file with node
This file contains 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
var request = require('request'), | |
zlib = require('zlib'), | |
tar = require('tar'); | |
request('http://wordpress.org/latest.tar.gz') | |
.pipe(zlib.Unzip()) | |
.pipe(tar.Extract({ path: __dirname })) | |
.on('error', function (er) { | |
console.error("error here" + er) | |
}) | |
.on('end', function () { | |
console.error("done") | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment