Idk why i made it do that lol

i18n
Michal S 2 years ago
parent 27d01ab47b
commit 74025f5230
No known key found for this signature in database
GPG Key ID: A6A1A4DCB22279B9

@ -117,38 +117,15 @@ fn cmd_install(args: InstallArgs, options: Options, cachedir: &str) {
// Show optional dependencies for installed packages
if packages.len() > 1 {
info!("Showing optional dependencies for installed packages");
for r in sorted.repo {
info!("{}:", r);
for p in packages {
info!("{}:", p);
std::process::Command::new("expac")
.args(&["-S", "-l", "\n ", " %O", &r])
.args(&["-Q", "-l", "\n ", " %O", &p])
.spawn()
.unwrap()
.wait()
.unwrap();
}
for a in sorted.aur {
info!("{}:", a);
let dir_bytes = std::process::Command::new("mktemp")
.arg("-d")
.output()
.unwrap()
.stdout;
let dir = String::from_utf8(dir_bytes).unwrap();
std::process::Command::new("bash")
.arg("-c")
.arg(format!("\
cd {}
curl -L https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h={} -o PKGBUILD -s
source PKGBUILD
printf ' %s\\n' \"${{optdepends[@]}}\"\
", dir, a))
.stderr(std::process::Stdio::piped())
.spawn()
.unwrap()
.wait()
.unwrap();
std::fs::remove_dir_all(&std::path::Path::new(&dir.trim())).unwrap();
}
}
}

Loading…
Cancel
Save