use libremetaverse_codegen::{regenerate, vendor_inputs, workspace_root}; use std::path::Path; fn main() { let arguments: Vec = std::env::args().skip(1).collect(); let root = workspace_root(); let result = match arguments.as_slice() { [command] if command == "generate" => regenerate(&root, false), [command] if command == "check" => regenerate(&root, true), [command, reference] if command == "vendor" => vendor_inputs(&root, Path::new(reference)), _ => Err( "usage: libremetaverse-codegen ".to_owned(), ), }; if let Err(error) = result { eprintln!("{error}"); std::process::exit(2); } }