feat: v0.2.2

This commit is contained in:
2023-02-23 01:05:53 +08:00
parent 2d620e963e
commit e283a210ad
4 changed files with 36 additions and 2 deletions

View File

@@ -7,10 +7,12 @@ use rust_util::util_os::get_user_home;
use crate::help::print_help;
use crate::install::install_script;
use crate::list::list_scripts;
use crate::util::{build_script_command, get_run_script_bin_name, read_file_and_digest, run_script_command};
mod util;
mod help;
mod list;
mod install;
const SCRIPT_TEMPLATE: &'static str = include_str!("script.template");
@@ -32,6 +34,10 @@ fn main() {
println!("{}", SCRIPT_TEMPLATE);
return;
}
if first_argument == "--list" || first_argument == "-l" {
list_scripts();
return;
}
if first_argument == "--install" || first_argument == "-i" {
install_script(args.iter().skip(1).collect());
return;