remove an useless TODO and add three good ones.
This commit is contained in:
parent
989025fe69
commit
0db8158795
1 changed files with 9 additions and 5 deletions
|
@ -5,7 +5,6 @@ mod parser;
|
|||
use std::env;
|
||||
|
||||
fn main() {
|
||||
let args: Vec<String> = env::args().collect();
|
||||
|
||||
// def env variables.
|
||||
let svdir_env = env::var("SVDIR");
|
||||
|
@ -16,8 +15,6 @@ fn main() {
|
|||
Err(..) => "/run/runit/service".to_string(),
|
||||
};
|
||||
|
||||
// TODO: check if directory exists
|
||||
|
||||
let svwait_var = match svwait_env {
|
||||
Ok(env) => match env.parse::<i32>() {
|
||||
Ok(var) => var,
|
||||
|
@ -30,11 +27,18 @@ fn main() {
|
|||
dbg!(svwait_var);
|
||||
|
||||
|
||||
// args
|
||||
// run the parser
|
||||
let args: Vec<String> = env::args().collect();
|
||||
|
||||
let arg_parser: Vec<String> = parser::parse_args(args);
|
||||
|
||||
dbg!(arg_parser);
|
||||
|
||||
|
||||
//dbg!(args);
|
||||
// TODO: Interpret the flags given if some are given.
|
||||
// TODO: Set the command if it is given
|
||||
// TODO: Exec the command on all given services.
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue