blob: 99acecdd43c356c641fd1e58723ca293eaf46cdd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
use anyhow::{Context, Result};
use clap::{self, Parser};
#[derive(Parser)]
struct CommandLine {
#[clap(subcommand)]
command: Subcommand,
}
#[derive(clap::Subcommand)]
enum Subcommand {
Generate(installer::Generator),
Combine(installer::Combiner),
Script(installer::Scripter),
Tarball(installer::Tarballer),
}
fn main() -> Result<()> {
let command_line = CommandLine::parse();
match command_line.command {
Subcommand::Combine(combiner) => combiner.run().context("failed to combine installers")?,
Subcommand::Generate(generator) => {
generator.run().context("failed to generate installer")?
}
Subcommand::Script(scripter) => {
scripter.run().context("failed to generate installation script")?
}
Subcommand::Tarball(tarballer) => tarballer.run().context("failed to generate tarballs")?,
}
Ok(())
}
|