Merge branch 'symlinks' into 'master'
Create symlinks before installing packages See merge request redox-os/installer!27
This commit is contained in:
+1
-1
@@ -46,7 +46,7 @@ pub struct FileConfig {
|
||||
|
||||
// TODO: Rewrite impls
|
||||
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 target_file = prefix.as_ref()
|
||||
.join(path);
|
||||
|
||||
+3
-3
@@ -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();
|
||||
|
||||
install_packages(&config, output_dir.to_str().unwrap(), cookbook);
|
||||
|
||||
for file in config.files {
|
||||
for file in &config.files {
|
||||
file.create(&output_dir)?;
|
||||
}
|
||||
|
||||
install_packages(&config, output_dir.to_str().unwrap(), cookbook);
|
||||
|
||||
let mut passwd = String::new();
|
||||
let mut shadow = String::new();
|
||||
let mut next_uid = 1000;
|
||||
|
||||
Reference in New Issue
Block a user