Some checks failed
Native code generation / deterministic (macos-latest) (push) Has been cancelled
Native code generation / deterministic (ubuntu-latest) (push) Has been cancelled
Native code generation / deterministic (windows-latest) (push) Has been cancelled
Imaging and meshing gate / native (macos-latest) (push) Has been cancelled
Imaging and meshing gate / native (ubuntu-latest) (push) Has been cancelled
Imaging and meshing gate / native (windows-latest) (push) Has been cancelled
JPEG 2000 feature / linux (push) Has been cancelled
JPEG 2000 feature / macos (push) Has been cancelled
JPEG 2000 feature / windows (push) Has been cancelled
Skia feature / linux (push) Has been cancelled
Skia feature / macos (push) Has been cancelled
Skia feature / windows (push) Has been cancelled
20 lines
731 B
Rust
20 lines
731 B
Rust
use libremetaverse_codegen::{regenerate, vendor_inputs, workspace_root};
|
|
use std::path::Path;
|
|
|
|
fn main() {
|
|
let arguments: Vec<String> = 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 <generate|check|vendor REFERENCE_CHECKOUT>".to_owned(),
|
|
),
|
|
};
|
|
if let Err(error) = result {
|
|
eprintln!("{error}");
|
|
std::process::exit(2);
|
|
}
|
|
}
|