Simplify the code (use ctor for all targets) and add a readme
This commit is contained in:
6
build.rs
6
build.rs
@@ -6,11 +6,11 @@ fn main() {
|
||||
|
||||
if let Ok(code_file) = env::var("FRIDA_CODE_FILE") {
|
||||
env::set_var("FRIDA_CODE", &std::fs::read_to_string(&code_file).unwrap());
|
||||
eprintln!("Using code from file: {}", &code_file);
|
||||
println!("cargo:warning=Using code from file: {}", &code_file);
|
||||
} else if env::var("FRIDA_CODE").is_ok() {
|
||||
eprintln!("Using code from environment variable: FRIDA_CODE");
|
||||
println!("cargo:warning=Using code from environment variable: FRIDA_CODE");
|
||||
} else {
|
||||
eprintln!("Please set FRIDA_CODE or FRIDA_CODE_FILE environment variable");
|
||||
println!("cargo:error=Please set FRIDA_CODE or FRIDA_CODE_FILE environment variable");
|
||||
std::process::exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user