|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
use crate::{clone, err_unrec, install, mods::strs::sec};
|
|
|
|
|
use std::process::{Command, Stdio};
|
|
|
|
|
use raur::SearchBy::Name;
|
|
|
|
|
|
|
|
|
|
pub fn inssort(noconfirm: bool, pkgs: Vec<String>) {
|
|
|
|
|
let mut repo = vec![];
|
|
|
|
@ -7,7 +8,7 @@ pub fn inssort(noconfirm: bool, pkgs: Vec<String>) {
|
|
|
|
|
for pkg in pkgs {
|
|
|
|
|
let out = Command::new("pacman")
|
|
|
|
|
.arg("-Ss")
|
|
|
|
|
.arg(&pkg)
|
|
|
|
|
.arg(format!("^{}$", &pkg))
|
|
|
|
|
.stdout(Stdio::null())
|
|
|
|
|
.status()
|
|
|
|
|
.expect("Something has gone wrong.");
|
|
|
|
@ -25,7 +26,12 @@ pub fn inssort(noconfirm: bool, pkgs: Vec<String>) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for a in aur {
|
|
|
|
|
let sea = raur::search_by(format!("^{}$", a), Name).unwrap();
|
|
|
|
|
if sea.len() == 0 {
|
|
|
|
|
err_unrec(format!("No matching packages found"))
|
|
|
|
|
} else {
|
|
|
|
|
sec(format!("Installing AUR package: {}", a));
|
|
|
|
|
clone(noconfirm, &a);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|