Fix issue when the missing package is in another directory.

This commit is contained in:
Eduard Tolosa 2019-04-22 23:58:47 -05:00
parent 48105e8db3
commit ca5503c354
2 changed files with 11 additions and 1 deletions

View file

@ -18,6 +18,8 @@ args:
long: build
help: Build package from PKGBUILD in clean chroot environment.
takes_value: false
conflicts_with:
- install-missing
- test:
short: t
long: test

View file

@ -190,7 +190,15 @@ pub fn build_package_with_missing_deps(missing: &[&str]) {
let chroot_blackarch = get_vars("chroot_blackarch");
let devtools_nspawn = get_vars("nspawn");
for missing in missing.iter() {
let copy_path: String = [&chroot_blackarch, "root/", &missing].concat();
let copy_path: String = [
&chroot_blackarch,
"root/",
&missing
.split("/")
.last()
.expect("Failed to gest package name."),
]
.concat();
println!("{}", &missing);
println!("{}", &copy_path);
Command::new("sudo")