mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
checkpoint
This commit is contained in:
parent
d88731a380
commit
907dddb0ca
3 changed files with 113 additions and 0 deletions
72
src/mfm.cpp
Normal file
72
src/mfm.cpp
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
#include "mfm.hpp"
|
||||
|
||||
#include "mfm_options.hpp"
|
||||
|
||||
#include "CLI11.hpp"
|
||||
|
||||
static
|
||||
void
|
||||
_setup_argparser_dup(CLI::App &app_,
|
||||
mfm::Opts::Dup &opts_)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static
|
||||
void
|
||||
_setup_argparser_watch(CLI::App &app_,
|
||||
mfm::Opts::Watch &opts_)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static
|
||||
void
|
||||
_setup_argparser_migrate(CLI::App &app_,
|
||||
mfm::Opts::Migrate &opts_)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static
|
||||
void
|
||||
_setup_argparser_rebalance(CLI::App &app_,
|
||||
mfm::Opts::Rebalance &opts_)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static
|
||||
void
|
||||
_setup_argparser(CLI::App &app_,
|
||||
mfm::Opts &opts_)
|
||||
{
|
||||
_setup_argparser_dup(app_,opts_.dup);
|
||||
_setup_argparser_migrate(app_,opts_.migrate);
|
||||
_setup_argparser_rebalance(app_,opts_.rebalance);
|
||||
_setup_argparser_watch(app_,opts_.watch);
|
||||
}
|
||||
|
||||
int
|
||||
mfm::main(int argc_,
|
||||
char **argv_)
|
||||
{
|
||||
CLI::App app;
|
||||
mfm::Opts opts;
|
||||
|
||||
app.description("mfm: mergerfs filesystem manager");
|
||||
app.name("USAGE:: mfm");
|
||||
|
||||
::_setup_argparser(app,opts);
|
||||
|
||||
try
|
||||
{
|
||||
app.parse(argc_,argv_);
|
||||
}
|
||||
catch(const CLI::ParseError &e_)
|
||||
{
|
||||
return app.exit(e_);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue