before index-conflict changes
This commit is contained in:
@ -1,10 +1,9 @@
|
||||
use std::path::PathBuf;
|
||||
use crate::utils::hardcopy::hardcopy_handler;
|
||||
use crate::utils::fs::hardcopy::hardcopy_handler;
|
||||
use crate::utils::shell::*;
|
||||
|
||||
pub fn link(repo: &String, pkgname: &String) -> Result<(), String> {
|
||||
let source = PathBuf::from("/pkg").join(repo).join(pkgname);
|
||||
if source.join("disabled").exists() { return Ok(()) }
|
||||
let source = crate::commands::get_aeropkg_base().join(repo).join(pkgname);
|
||||
if source.join("disabled").exists() { println!("Can't link disabled package: {}", &pkgname); return Ok(()) }
|
||||
|
||||
let destination = source.parent()
|
||||
.ok_or("Failed to get parent directory for path")?
|
||||
@ -12,6 +11,7 @@ pub fn link(repo: &String, pkgname: &String) -> Result<(), String> {
|
||||
|
||||
let dirs_to_copy = vec![
|
||||
("bin"),
|
||||
("sbin"),
|
||||
("lib"),
|
||||
("libexec"),
|
||||
("include"),
|
||||
|
||||
Reference in New Issue
Block a user