Browse Source

mergerfs.cpp

passthrough-depth
Antonio SJ Musumeci 1 month ago
parent
commit
cf07e9cb89
  1. 61
      src/mergerfs.cpp

61
src/mergerfs.cpp

@ -381,66 +381,5 @@ int
main(int argc_,
char **argv_)
{
CLI::App app;
bool foreground;
bool debug;
std::vector<std::string> opts;
std::vector<std::string> branches;
std::string mountpoint;
app.description("mergerfs: A featureful union filesystem");
app.name("USAGE: mergerfs");
app.add_option("-o",opts)
->description("")
->delimiter(',')
;
app.add_flag("-f,--foreground",foreground)
->description("")
;
app.add_flag("-d,--debug",debug)
->description("")
;
app.add_option("branches",branches)
->delimiter(':')
->expected(2,-1)
;
app.add_option("mountpoint")
;
try
{
app.parse(argc_,argv_);
}
catch(const CLI::ParseError &e_)
{
return app.exit(e_);
}
mountpoint = branches.back();
branches.pop_back();
fmt::println("foreground: {}\n"
"debug: {}\n"
"mountpoint: {}\n"
,
foreground,
debug,
mountpoint
);
fmt::println("branches:");
for(auto &branch : branches)
fmt::println("{}",branch);
fmt::println("opts:");
for(auto &opt : opts)
fmt::print("{}\n",opt);
return 0;
return ::_pick_app_and_run(argc_,argv_);
}
Loading…
Cancel
Save