From 2536cfdb527cd252ed926e3c05313430858a4ca6 Mon Sep 17 00:00:00 2001 From: Namilskyy Date: Sat, 29 Nov 2025 19:17:16 +0300 Subject: Added credits subcommand and major fixes --- Cargo.toml | 4 +--- src/main.rs | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 63d73e0..6c71c6a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,7 @@ authors = ["namilsk ", clap = { version = "4.5.53", features = ["derive"] } toml = { version = "0.9.8", features = ["serde"] } serde = { version = "1.0.228", features = ["derive"] } +tokio = { version = "1.48.0", features = ["macros", "rt"] } flate2 = "1.1.5" log = "0.4.28" sqlite = "0.37.0" @@ -18,7 +19,4 @@ tar = "0.4.44" emissary-core = "0.2.0" yosemite = "0.6.1" cc = "1.2.48" -tokio = { version = "1.48.0", features = ["macros", "rt"] } - - diff --git a/src/main.rs b/src/main.rs index a3f69dd..c38d265 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,7 +5,6 @@ mod pkgtoolkit; use crate::cfg::config::Config; #[allow(unused_imports)] use crate::pkgtoolkit::pkgtools::Package; -#[allow(unused_imports)] use crate::i2impl::mi2p::I2P; use clap::{Args, Command, Parser, Subcommand}; @@ -26,7 +25,7 @@ struct Cli { enum Commands { #[command(about = "Validate .mesk package archive")] Validate { - pkgname: String, + path: String, }, #[command(about = "Update all repositories index")] Update, @@ -56,8 +55,9 @@ enum Commands { repo: Option, cachedir: Option, buildir: Option, - } - + }, + #[command(about = "Maintaners, links, developers and more info")] + Credits } #[derive(Args, Clone)] @@ -77,8 +77,8 @@ async fn main() -> Result<(), std::io::Error> { // Plug in these functions only until the backend is ready for testing (Aplha versions) // It is necessary for me to understand the I/O model of the future mesk. match &cli.command { - Commands::Validate { pkgname } => { - println!("Validating {}", pkgname); + Commands::Validate { path } => { + println!("Validating {}", path); return Ok(()) }, Commands::Build { pkgname } => { @@ -144,8 +144,13 @@ async fn main() -> Result<(), std::io::Error> { println!("Upgrading all packages"); return Ok(()) }, + Commands::Credits => { + println!("CREATED BY: Asya and Namilsk as part of the Anthrill independent Global network distribution project"); + println!(" "); + println!("The Anthrill project repos: https://codeberg.org/NamelessTeam"); + } + } + Ok(()) -} -Ok(()) } \ No newline at end of file -- cgit v1.2.3