Add DragonFly BSD support (#176)

This commit is contained in:
Zach Crownover
2019-06-25 22:47:36 -07:00
committed by Roey Darwish Dror
parent 4427528212
commit e8ed0d996c
4 changed files with 44 additions and 1 deletions

View File

@@ -86,7 +86,7 @@ fn run() -> Result<(), Error> {
let mut report = Report::new();
#[cfg(any(target_os = "freebsd", target_os = "linux"))]
#[cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "linux"))]
let sudo = utils::which("sudo");
let run_type = executor::RunType::new(config.dry_run());
@@ -188,6 +188,13 @@ fn run() -> Result<(), Error> {
|| unix::run_homebrew(config.cleanup(), run_type),
config.no_retry(),
)?;
#[cfg(target_os = "dragonfly")]
execute(
&mut report,
"DragonFly BSD Packages",
|| dragonfly::upgrade_packages(sudo.as_ref(), run_type),
config.no_retry(),
)?;
#[cfg(target_os = "freebsd")]
execute(
&mut report,
@@ -496,6 +503,9 @@ fn run() -> Result<(), Error> {
#[cfg(target_os = "freebsd")]
freebsd::audit_packages(&sudo).ok();
#[cfg(target_os = "dragonfly")]
dragonfly::audit_packages(&sudo).ok();
}
if config.keep_at_end() {