mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-04-20 11:35:48 +00:00
feat: deptype for udev rules
This commit is contained in:
parent
a081639a6f
commit
4c42a1c71c
1 changed files with 6 additions and 0 deletions
|
@ -6,6 +6,7 @@ pub enum DepType {
|
|||
SharedObject,
|
||||
Executable,
|
||||
Include,
|
||||
UdevRule,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
|
@ -38,6 +39,7 @@ impl Dependency {
|
|||
.map(str::to_string)
|
||||
.collect(),
|
||||
DepType::Include => include_paths(),
|
||||
DepType::UdevRule => udev_rules_paths(),
|
||||
} {
|
||||
let path_s = &format!("{dir}/{fname}", dir = dir, fname = self.filename);
|
||||
let path = Path::new(&path_s);
|
||||
|
@ -121,6 +123,10 @@ fn include_paths() -> Vec<String> {
|
|||
]
|
||||
}
|
||||
|
||||
fn udev_rules_paths() -> Vec<String> {
|
||||
vec!["/usr/lib/udev/rules.d".into()]
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::{DepType, Dependency};
|
||||
|
|
Loading…
Add table
Reference in a new issue