Skip to content
Snippets Groups Projects
Commit aa1a9824 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Merge branch 'symlinks' into 'master'

Create symlinks before installing packages

See merge request !27
parents 38f6aa70 b4f2f01d
No related branches found
No related tags found
1 merge request!27Create symlinks before installing packages
...@@ -46,7 +46,7 @@ pub struct FileConfig { ...@@ -46,7 +46,7 @@ pub struct FileConfig {
// TODO: Rewrite impls // TODO: Rewrite impls
impl FileConfig { impl FileConfig {
pub(crate) fn create<P: AsRef<Path>>(self, prefix: P) -> Result<()> { pub(crate) fn create<P: AsRef<Path>>(&self, prefix: P) -> Result<()> {
let path = self.path.trim_start_matches('/'); let path = self.path.trim_start_matches('/');
let target_file = prefix.as_ref() let target_file = prefix.as_ref()
.join(path); .join(path);
......
...@@ -172,12 +172,12 @@ pub fn install_dir<P: AsRef<Path>, S: AsRef<str>>(config: Config, output_dir: P, ...@@ -172,12 +172,12 @@ pub fn install_dir<P: AsRef<Path>, S: AsRef<str>>(config: Config, output_dir: P,
let output_dir = output_dir.to_owned(); let output_dir = output_dir.to_owned();
install_packages(&config, output_dir.to_str().unwrap(), cookbook); for file in &config.files {
for file in config.files {
file.create(&output_dir)?; file.create(&output_dir)?;
} }
install_packages(&config, output_dir.to_str().unwrap(), cookbook);
let mut passwd = String::new(); let mut passwd = String::new();
let mut shadow = String::new(); let mut shadow = String::new();
let mut next_uid = 1000; let mut next_uid = 1000;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment