Permalink
Browse files

enabling resume option in tusk install, skips zip tarballs already pr…

…esent
  • Loading branch information...
1 parent f41a28c commit d628825c0477328f729053aebc17bf62caf0d40c @anddam anddam committed Nov 9, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 packages/tusk/lib/tusk/commands/install.js
@@ -23,6 +23,10 @@ parser.args('package');
parser.option('-f', '--force', 'force')
.bool()
.help('causes packages to be installed in the project packages directory regardless of whether they are installed elsewhere');
+
+parser.option('-r', '--resume', 'resume')
+ .bool()
+ .help('resumes installing using valid zip files already fetched');
/*
parser.option('-l', '--lean', 'lean')
.bool()
@@ -174,8 +178,10 @@ exports.install = function (options, names) {
if (options.simulate)
return;
var zipFile = zipsDirectory.join(name + '.zip')
- if (options.resume && zipFile.isFile())
+ if (options.resume && zipFile.isFile()) {
+ print('Downloading skipped: file ' + zipFile + ' already fetched and valid' );
return;
+ }
var targetPath = tusk.getDirectory().join('packages', name);
http.copy(info.packageUrl, zipFile);
});

0 comments on commit d628825

Please sign in to comment.