summaryrefslogtreecommitdiffstats
path: root/gui/src/main.rs
blob: ea47a93bad7fd77580d0378dbb30db86eb54765e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use anyhow::Result;

mod cli;
mod gui;

use distrox_lib::*;

fn main() -> Result<()> {
    let _ = env_logger::try_init()?;
    let matches = crate::cli::app().get_matches();

    match matches.subcommand() {
        None => crate::gui::run(),
        Some((other, _)) => {
            log::error!("No subcommand {} implemented", other);
            Ok(())
        },

        _ => {
            log::error!("Don't know what to do");
            Ok(())
        },
    }
}