diff --git a/src/mergerfs.cpp b/src/mergerfs.cpp index 516eb9c3..7763ab4f 100644 --- a/src/mergerfs.cpp +++ b/src/mergerfs.cpp @@ -381,66 +381,5 @@ int main(int argc_, char **argv_) { - CLI::App app; - - bool foreground; - bool debug; - std::vector opts; - std::vector 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_); }