fn generate_scripts(archive: &mut Archive, option: &Config) -> CDResult<()> {
    if let Some(ref maintainer_scripts) = option.maintainer_scripts {
        for name in &["config", "preinst", "postinst", "prerm", "postrm", "templates"] {
            if let Ok(script) = fs::read(maintainer_scripts.join(name)) {
                archive.file(name, &script, 0o755)?;
            }
        }
    }
    Ok(())
}
/// Append all files that reside in the `maintainer_scripts` path to the archive
Append all files that reside in the `maintainer_scripts` path to the archive
Append all files that reside in the ` maintainer_scripts ` path to the archive
fn generate_scripts(archive: &mut Archive, option: &Config) -> CDResult<()> {
    if let Some(ref maintainer_scripts) = option.maintainer_scripts {
        for name in &["config", "preinst", "postinst", "prerm", "postrm", "templates"] {
            if let Ok(script) = fs::read(maintainer_scripts.join(name)) {
                archive.file(name, &script, 0o755)?;
            }
        }
    }
    Ok(())
}
fn generate_scripts ( archive : & mut Archive , option : & Config ) -> CDResult < ( ) > { if let Some ( ref maintainer_scripts ) = option . maintainer_scripts { for name in & [ " " , " " , " " , " " , " " , " " ] { if let Ok ( script ) = fs :: read ( maintainer_scripts . join ( name ) ) { archive . file ( name , & script , 0o755 ) ? ; } } } Ok ( ( ) ) }
Append all files that reside in the `maintainer_scripts` path to the archive
Append all files that reside in the ` maintainer_scripts ` path to the archive
archive
&mut Archive
option
&Config
archive
&mut Archive
option
&Config