Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally: exit 0 on tilelive-copy #156

Merged
merged 2 commits into from
Jan 11, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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