smirrors 0.1.0

Automatic mirror list updater for Linux distributions
Documentation
//! SMirrors - Automatic Mirror List Updater
//!
//! Main entry point for the SMirrors CLI application.

use anyhow::Result;
use smirrors::cli::{handle_command, Cli};

#[tokio::main]
async fn main() -> Result<()> {
    // Parse command-line arguments
    let cli = Cli::parse_args();

    // Handle the command
    if let Err(e) = handle_command(cli).await {
        eprintln!("Error: {}", e);

        // Print chain of error causes
        let mut source = e.source();
        while let Some(cause) = source {
            eprintln!("  Caused by: {}", cause);
            source = cause.source();
        }

        std::process::exit(1);
    }

    Ok(())
}