chore: move crs_template.txt to resources/
This commit is contained in:
24
resources/crs_template.txt
Normal file
24
resources/crs_template.txt
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env run-cargo-script
|
||||
// cargo-deps: regex="1.3.9"
|
||||
|
||||
fn main() {
|
||||
unimplemented!("Script is NOT implemented!");
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------ //
|
||||
const RED: &str = "\x1B[91m";
|
||||
const GREEN: &str = "\x1B[92m";
|
||||
const YELLOW: &str = "\x1B[93m";
|
||||
const BOLD: &str = "\x1B[1m";
|
||||
const UNDER: &str = "\x1B[4m";
|
||||
const END: &str = "\x1B[0m";
|
||||
|
||||
fn is_verbose() -> bool { if let Ok(v) = std::env::var("VERBOSE") { v == "1" } else { false } }
|
||||
|
||||
fn exit_with_error() -> ! { std::process::exit(1) }
|
||||
fn exit_with_error_message(msg: &str) -> ! { print_error(msg); exit_with_error() }
|
||||
|
||||
fn print_info (msg: &str) { println!("{b}[INFO ]{e} {m}", b = BOLD, e = END, m = msg); }
|
||||
fn print_ok (msg: &str) { println!("{g}{b}[OK ]{e} {g}{m}{e}", g = GREEN, b = BOLD, e = END, m = msg); }
|
||||
fn print_warn (msg: &str) { println!("{y}{b}[WARN ]{e} {y}{m}{e}", y = YELLOW, b = BOLD, e = END, m = msg); }
|
||||
fn print_error(msg: &str) { println!("{r}{b}[ERROR]{e} {r}{m}{e}", r = RED, b = BOLD, e = END, m = msg); }
|
||||
Reference in New Issue
Block a user