Created
March 25, 2015 16:57
-
-
Save justinhernandez/fd9e064fb88fb77cd3f8 to your computer and use it in GitHub Desktop.
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 fs = require('fs'); | |
var base = '../vagabond'; | |
var dirs = fs.readdirSync(base); | |
var _ = require('lodash'); | |
var archiver = require('archiver'); | |
_.each(dirs, function(dir){ | |
var archive = archiver('zip', { zlib: { level: 9 } }); | |
var output = fs.createWriteStream('../zips/vagabond-' + dir + '.cbz'); | |
archive.pipe(output); | |
archive.directory(base + '/' + dir).finalize(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment