|
|
@ -82,11 +82,41 @@ fn cmd_install(args: InstallArgs, options: Options) {
|
|
|
|
|
|
|
|
|
|
|
|
if !sorted.repo.is_empty() {
|
|
|
|
if !sorted.repo.is_empty() {
|
|
|
|
// If repo packages found, install them
|
|
|
|
// If repo packages found, install them
|
|
|
|
operations::install(sorted.repo, options);
|
|
|
|
operations::install(sorted.repo.clone(), options);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if !sorted.aur.is_empty() {
|
|
|
|
if !sorted.aur.is_empty() {
|
|
|
|
// If AUR packages found, install them
|
|
|
|
// If AUR packages found, install them
|
|
|
|
operations::aur_install(sorted.aur, options);
|
|
|
|
operations::aur_install(sorted.aur.clone(), options);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Show optional dependencies for installed packages
|
|
|
|
|
|
|
|
info!("Showing optional dependencies for installed packages");
|
|
|
|
|
|
|
|
for r in sorted.repo {
|
|
|
|
|
|
|
|
info!("{}:", r);
|
|
|
|
|
|
|
|
std::process::Command::new("expac")
|
|
|
|
|
|
|
|
.args(&["-S", "-l", "\n ", " %O", &r])
|
|
|
|
|
|
|
|
.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))
|
|
|
|
|
|
|
|
.spawn()
|
|
|
|
|
|
|
|
.unwrap()
|
|
|
|
|
|
|
|
.wait()
|
|
|
|
|
|
|
|
.unwrap();
|
|
|
|
|
|
|
|
std::fs::remove_dir_all(&std::path::Path::new(&dir.trim())).unwrap();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|