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.
amethyst/src/main.rs

28 lines
588 B
Rust

mod clone;
mod uninstall;
mod help;
mod upgrade;
use crate::{clone::clone, help::help, uninstall::uninstall, upgrade::upgrade};
use std::{env, process::exit};
fn main() {
let args: Vec<String> = env::args().collect();
let oper = &args[1];
print!("{}", oper);
if oper == "-S" {
for arg in env::args().skip(2) {
clone(&arg);
}
} else if oper == "-R" {
for arg in env::args().skip(2) {
uninstall(&arg);
}
} else if oper == "-Syu" {
upgrade();
} else {
help();
exit(0);
}
}