Skip to content

Commit

Permalink
Merge pull request #156 from mapbox/exit0
Browse files Browse the repository at this point in the history
Optionally: exit 0 on tilelive-copy
  • Loading branch information
yhahn committed Jan 11, 2016
2 parents 3b0dd7e + 4d77963 commit 0f67183
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/tilelive-copy
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ if (!argv._[0]) {
console.log(' --withoutprogress Shows progress by default.');
console.log(' --timeout=[number] Timeout after n ms of inactivity.');
console.log(' --slow=[number] Warn on slow tiles.');
console.log(' --exit Exit explicitly when copy is complete.');
console.log(' --bounds=[w,s,e,n]');
console.log(' --minzoom=[number]');
console.log(' --maxzoom=[number]');
Expand All @@ -52,6 +53,7 @@ argv.part = isNumeric(argv.part) ? argv.part : undefined;
argv.retry = isNumeric(argv.retry) ? parseInt(argv.retry,10) : undefined;
argv.timeout = isNumeric(argv.timeout) ? parseInt(argv.timeout,10) : undefined;
argv.slow = isNumeric(argv.slow) ? parseInt(argv.slow,10) : undefined;
argv.exit = argv.exit || undefined;

if (argv.scheme !== 'pyramid' && argv.scheme !== 'scanline' && argv.scheme !== 'list') {
console.warn('scheme must be one of pyramid, scanline, list');
Expand Down Expand Up @@ -97,6 +99,7 @@ function copy() {
tilelive.copy(srcuri, dsturi, options, function(err) {
if (err) throw err;
console.log('');
if (argv.exit) process.exit(0);
});
}

Expand Down

0 comments on commit 0f67183

Please sign in to comment.