Fix option parsing
This commit is contained in:
parent
7fe6f8ddfd
commit
ec3545f119
|
@ -13,23 +13,22 @@ void main(string[] args)
|
||||||
{
|
{
|
||||||
//TODO: Make tag provider(s) configurable
|
//TODO: Make tag provider(s) configurable
|
||||||
|
|
||||||
if(args.length < 2)
|
if(args.length < 3)
|
||||||
{
|
{
|
||||||
stderr.writeln("usage: dtagfs <source> <mount point> [-f] [-o option[,options...]]");
|
stderr.writeln("usage: dtagfs <source> <mount point> [-f] [-o option[,options...]]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto source = args[0];
|
auto source = args[1];
|
||||||
auto mountPoint = args[1];
|
auto mountPoint = args[2];
|
||||||
|
|
||||||
TagProvider[] tagProviders;
|
TagProvider[] tagProviders;
|
||||||
|
|
||||||
string[] mountOptions;
|
string[] mountOptions;
|
||||||
bool fork;
|
bool fork;
|
||||||
arraySep = ",";
|
arraySep = ",";
|
||||||
auto otherArgs = args[2..$];
|
|
||||||
auto options = getopt(
|
auto options = getopt(
|
||||||
otherArgs,
|
args,
|
||||||
|
|
||||||
"o", &mountOptions,
|
"o", &mountOptions,
|
||||||
"f|fork", &fork
|
"f|fork", &fork
|
||||||
|
|
Loading…
Reference in New Issue