use std::process::Command;
fn main() -> Result<(), String> {
if cfg!(feature = "force-build") {
#[cfg(target_os = "linux")]
let command = Command::new("touch").args(&["build.rs"]).output();
#[cfg(target_os = "windows")]
let command = Command::new("cmd").args(&["/k", "\"copy /b build.rs +,\""]).output();
let output = command.map_err(|e| e.to_string())?;
if !output.status.success() {
let out = String::from_utf8_lossy(&output.stderr);
Err(format!("{}", out))
} else {
Ok(())
}
} else {
Ok(())
}
}