#![allow(warnings)]
use clap::Parser;
mod action;
mod args;
use args::Action;
fn main() {
pretty_env_logger::init();
let mut args = std::env::args().collect::<Vec<_>>();
profile_time::debug_time! {
if !args.contains(&"-D".to_owned()) {
println!("If you are using this tool normally, you should be running the release mode;
the debug mode (which you are running currently) is meant for developers to debug their application.
See https://github.com/rohankid1/mkml/ on how to get the release mode which is more optimised.");
println!("If you are debugging or a developer and want to remove this message, run the application again
but with -D");
}
let search = args.binary_search(&"-D".to_owned());
if search.is_ok() {
args.remove(search.unwrap());
}
}
let args = args::App::parse_from(args);
log::info!("Started");
match &args.action {
Action::Init(_) => action::initialize_project(&args),
Action::Clone(_) => action::clone_project(&args),
Action::Update(flags) => action::update(flags),
}
}