summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNamilskyy <alive6863@gmail.com>2025-11-29 19:17:16 +0300
committerNamilskyy <alive6863@gmail.com>2025-11-29 19:18:00 +0300
commit2536cfdb527cd252ed926e3c05313430858a4ca6 (patch)
tree38db365676a86f807ba7ec39219cd27cff7c5233
parent90915627fbda81238a577d531311818a01c2f950 (diff)
Added credits subcommand and major fixes
-rw-r--r--Cargo.toml4
-rw-r--r--src/main.rs21
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 <namilsk@namilsk.tech>",
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<String>,
cachedir: Option<String>,
buildir: Option<String>,
- }
-
+ },
+ #[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