Compare commits

..

No commits in common. "bee369b5f80d260a8c8654bf758348b870dea77a" and "3a4559723be0fb02710682c9903b078d3d05059b" have entirely different histories.

View file

@ -5,40 +5,13 @@ mod parser;
use std::env; use std::env;
fn main() { fn main() {
// def env variables.
let svdir_env = env::var("SVDIR");
let svwait_env = env::var("SVWAIT");
let svdir_var = match svdir_env {
Ok(var) => var,
Err(..) => "/run/runit/service".to_string(),
};
let svwait_var = match svwait_env {
Ok(env) => match env.parse::<i32>() {
Ok(var) => var,
Err(..) => 7,
},
Err(..) => 7,
};
dbg!(svdir_var);
dbg!(svwait_var);
// run the parser
let args: Vec<String> = env::args().collect(); let args: Vec<String> = env::args().collect();
// args
let arg_parser: Vec<String> = parser::parse_args(args); let arg_parser: Vec<String> = parser::parse_args(args);
dbg!(arg_parser); dbg!(arg_parser);
// TODO: Interpret the flags given if some are given. //dbg!(args);
// TODO: Set the command if it is given
// TODO: Exec the command on all given services.
} }