Files
AeroPkg/src/utils/command_handler/link.rs

30 lines
758 B
Rust
Raw Normal View History

2025-11-18 19:46:36 +03:00
use crate::commands;
pub fn link(matches: &clap::ArgMatches) {
let repo = matches.get_one::<String>("repo").unwrap();
let pkgname = matches.get_one::<String>("pkgname").unwrap();
match commands::link::link(&repo, &pkgname) {
Ok(_) => println!("link completed successfully."),
Err(e) => eprintln!("Error during link: {}", e),
}
}
pub fn command() -> clap::Command {
clap::Command::new("link")
.about("Create package links and mount overlays")
.arg(
clap::Arg::new("repo")
.help("Repository name")
.required(true)
.index(1),
)
.arg(
clap::Arg::new("pkgname")
.help("Package name")
.required(true)
.index(2),
)
}