mod chroot;
pub use chroot::*;
mod command;
pub use command::*;
mod iterators;
pub use iterators::*;
mod path;
pub use path::*;
pub mod reexec;
mod result_ext;
pub use result_ext::*;
mod timestamp;
pub use timestamp::*;
mod tracing_util;
pub use tracing_util::*;
mod uki;
pub use uki::*;
pub const NAME: &str = "bootc";
pub fn podman_bin() -> &'static str {
static BIN: std::sync::OnceLock<String> = std::sync::OnceLock::new();
BIN.get_or_init(|| {
std::env::var("BOOTC_EXP_EXTERNAL_CONTAINER_TOOL").unwrap_or_else(|_| "podman".to_string())
})
}
pub fn skopeo_bin() -> &'static str {
static BIN: std::sync::OnceLock<String> = std::sync::OnceLock::new();
BIN.get_or_init(|| {
std::env::var("BOOTC_EXP_EXTERNAL_CONTAINER_TOOL").unwrap_or_else(|_| "skopeo".to_string())
})
}
pub fn run_main<F>(f: F)
where
F: FnOnce() -> anyhow::Result<()>,
{
use std::io::Write as _;
use owo_colors::OwoColorize;
if let Err(e) = f() {
let mut stderr = anstream::stderr();
let _ = writeln!(stderr, "{}{:#}", "error: ".red(), e);
std::process::exit(1);
}
}