You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.0 KiB
Rust

mod download;
mod query;
mod list;
mod remove;
mod repository;
mod install;
mod package;
mod config;
mod arguments;
use std::collections::HashMap;
use crate::repository::find_package_in_repositories;
fn main() {
let args = std::env::args().collect::<Vec<String>>();
let operation = args.get(1).expect("Not enough arguments!"); // Get the operation
let args = args.get(2..).unwrap().to_vec();
match operation.as_str() {
"upgrade" | "u" => { // Will upgrade the selected package(s).
let packages = arguments::get_package_install_list(args);
}
"install" | "i" => { // Install the selected package(s).
let packages = arguments::get_package_install_list(args);
dbg!(packages);
}
"remove" | "r" => {
}
"list" | "l" => {
}
"query" | "q" => {
}
"config" | "c" => {
}
"repository" | "repo" => {
}
_ => {
panic!("Unknown operation: {}", operation);
}
}
}