mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
mergerfs.cpp
This commit is contained in:
parent
075cbfc23f
commit
cf07e9cb89
1 changed files with 0 additions and 61 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue