Document steps in main.

This commit is contained in:
Bas Wiel, van de 2024-04-30 18:49:14 +02:00
parent 5b51830e6d
commit cee8ef9a8a
1 changed files with 6 additions and 1 deletions

View File

@ -37,12 +37,17 @@ fn main() {
let cli = Cli::parse();
match &cli.command {
Commands::Build { name } => {
// Load the manifest struct from a YAML file
let manifest = manifest::Manifest::load(name.as_str()).unwrap();
// Display the application header
print_header();
// Display some misc metadata from the manifest we got
println!("{}", manifest.get_metadata());
println!("{}", manifest);
// Construct a DiskBuilder struct from the manifest.
let mut builder = DiskBuilder::new(&manifest).expect("Failed to create a DiskBuilder for this manifest.");
builder.build();
// If that worked, we're ready to do some actual building.
builder.build().expect("Failed to build the disk image.");
}
Commands::Analyze { name } => {
print_header();