feat(notstrap): add new-machine bootstrap orchestrator

This commit is contained in:
Joseph O'Brien
2026-03-31 17:29:08 -04:00
parent 7339e2070d
commit 4025ed037b
4 changed files with 248 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
use anyhow::{Context, Result};
use std::path::Path;
use std::process::Command;
pub fn clone_if_missing(url: &str, dest: &Path) -> Result<bool> {
if dest.exists() {
return Ok(false);
}
let status = Command::new("git")
.args(["clone", url, dest.to_str().unwrap()])
.status()
.context("failed to run git clone")?;
if !status.success() {
anyhow::bail!("git clone {} failed", url);
}
Ok(true)
}