curl: add --output-dir

Works with --create-dirs and with -J

Add test 3008, 3009, 3011, 3012 and 3013 to verify.

Closes #5637
This commit is contained in:
Daniel Stenberg 2020-08-24 08:31:36 +02:00
parent 510d98157f
commit 5620d2cc78
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
17 changed files with 381 additions and 24 deletions

View file

@ -303,6 +303,7 @@ static const struct LongShort aliases[]= {
{"o", "output", ARG_FILENAME},
{"O", "remote-name", ARG_NONE},
{"Oa", "remote-name-all", ARG_BOOL},
{"Ob", "output-dir", ARG_STRING},
{"p", "proxytunnel", ARG_BOOL},
{"P", "ftp-port", ARG_STRING},
{"q", "disable", ARG_BOOL},
@ -1911,6 +1912,10 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
config->default_node_flags = toggle?GETOUT_USEREMOTE:0;
break;
}
else if(subletter == 'b') { /* --output-dir */
GetStr(&config->output_dir, nextarg);
break;
}
/* FALLTHROUGH */
case 'o': /* --output */
/* output file */