Code cleanup

This commit is contained in:
Andrew Schott 2024-09-29 00:11:13 -05:00
parent b3b9231554
commit 72b5f977dc
2 changed files with 13 additions and 2 deletions

Binary file not shown.

View file

@ -48,7 +48,7 @@ fn update_dnf() {
trim_newline(&mut sudo_bin);
let find_dnf5 = Command::new("which")
.arg("dnf5").stdout(Stdio::piped()).output().unwrap();
.arg("dnf5").stdout(Stdio::piped()).output().unwrap();
let mut dnf5_bin = String::from_utf8(find_dnf5.stdout).unwrap();
trim_newline(&mut dnf5_bin);
@ -347,7 +347,7 @@ fn main() {
// update_all();
let matches = command!() // requires `cargo` feature
let matches = command!()
.arg(
Arg::new("UPDATE_TOOL")
.help("What updater to run")
@ -371,34 +371,45 @@ fn main() {
if args.contains(&"all") {
update_all()
}
if args.contains(&"apt") {
update_apt()
}
if args.contains(&"distrobox") {
update_distrobox()
}
if args.contains(&"dnf") {
update_dnf()
}
if args.contains(&"flatpak") {
update_flatpak()
}
if args.contains(&"pacman") {
update_pacman()
}
if args.contains(&"podman") {
update_podman()
}
if args.contains(&"python") {
update_python()
}
if args.contains(&"snap") {
update_snap()
}
if args.contains(&"urpmi") {
update_urpmi()
}
if args.contains(&"zypper") {
update_zypper()
}
}