1
0
Fork 0

Finish FVM package

This commit is contained in:
Florian RICHER (MrDev023) 2021-07-24 20:17:11 +02:00
parent f2bf17fde9
commit 3c390e5396
13 changed files with 178 additions and 28 deletions

35
src/linux/mod.rs Normal file
View file

@ -0,0 +1,35 @@
use structopt::{
StructOpt,
clap::{
arg_enum
}
};
arg_enum! {
#[derive(Debug)]
enum Tool {
Fvm
}
}
#[derive(Debug, StructOpt)]
#[structopt(name = "autoconfig", about = "Auto install local config.")]
struct Opt {
#[structopt(short = "i", long = "install", help = "Available values : fvm (Flutter version manager)")]
tools: Vec<Tool>,
}
pub fn start() {
let opt = Opt::from_args();
for tool in &opt.tools {
let result = match tool {
Tool::Fvm => super::common::fvm::install()
};
if let Err(err) = result {
eprintln!("[ERROR] {}", err);
}
}
}