-
Notifications
You must be signed in to change notification settings - Fork 26
Add a flag --skip-cached to skip already-downloaded models and collections #461
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
base: gz-fuel-tools10
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -126,7 +126,8 @@ SUBCOMMANDS = { | |||||
" -t [--type] arg Limit what resource type (i.e. model, world) \n"\ | ||||||
" to download from a collection. All resources \n"\ | ||||||
" will be downloaded if unspecified. Ignored \n"\ | ||||||
" if not downloading collection. \n"+ | ||||||
" if not downloading collection. \n"\ | ||||||
" -s [--skip-cached] Skip downloading resources already in cache. \n"+ | ||||||
COMMON_OPTIONS, | ||||||
|
||||||
'edit' => | ||||||
|
@@ -228,7 +229,8 @@ class Cmd | |||||
'onlymodels' => '0', | ||||||
'onlyworlds' => '0', | ||||||
'defaults' => false, | ||||||
'console' => false | ||||||
'console' => false, | ||||||
'skip_cached' => 'false' | ||||||
} | ||||||
|
||||||
usage = COMMANDS[args[0]] | ||||||
|
@@ -302,6 +304,9 @@ class Cmd | |||||
opts.on('--console', 'Output to console') do | ||||||
options['console'] = true | ||||||
end | ||||||
opts.on('-s', '--skip-cached', 'Skip downloading resources already in cache') do | ||||||
options['skip_cached'] = 'true' | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
end | ||||||
end # opt_parser do | ||||||
|
||||||
opt_parser.parse!(args) | ||||||
|
@@ -434,9 +439,9 @@ class Cmd | |||||
exit(-1) | ||||||
end | ||||||
when 'download' | ||||||
Importer.extern 'int downloadUrl(const char *, const char *, const char *, const char *, unsigned int)' | ||||||
Importer.extern 'int downloadUrl(const char *, const char *, const char *, const char *, unsigned int, const char *)' | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @ahcorde
I need to determine whether this issue came from the |
||||||
if not Importer.downloadUrl(options['url'], options['config'], | ||||||
options['header'], options['type'], options['jobs_int']) | ||||||
options['header'], options['type'], options['jobs_int'], options['skip_cached']) | ||||||
exit(-1) | ||||||
end | ||||||
when 'edit' | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.