diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-08-24 08:31:36 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-08-24 22:41:37 +0200 |
commit | 5620d2cc78c018f6ae15ba9aab371aa388146df0 (patch) | |
tree | 897b7e75250a644e5aeae81de5daf3498602286b /src/tool_getparam.c | |
parent | 510d98157f21dee5793c4e975fde3317b6139267 (diff) | |
download | curl-5620d2cc78c018f6ae15ba9aab371aa388146df0.tar.gz |
curl: add --output-dir
Works with --create-dirs and with -J
Add test 3008, 3009, 3011, 3012 and 3013 to verify.
Closes #5637
Diffstat (limited to 'src/tool_getparam.c')
-rw-r--r-- | src/tool_getparam.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tool_getparam.c b/src/tool_getparam.c index 0648c29b9..74b6b7369 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -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 */ |