mirror of
https://github.com/sharkdp/bat.git
synced 2024-11-24 16:53:55 +01:00
Allow customizing output directory for generated assets
This commit is contained in:
parent
c7905a6029
commit
01f1b1efe8
4
build.rs
4
build.rs
@ -43,7 +43,9 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
variables.insert("PROJECT_EXECUTABLE_UPPERCASE", &executable_name_uppercase);
|
||||
variables.insert("PROJECT_VERSION", PROJECT_VERSION);
|
||||
|
||||
let out_dir_env = std::env::var_os("OUT_DIR").expect("OUT_DIR to be set in build.rs");
|
||||
let out_dir_env = std::env::var_os("BAT_ASSETS_GEN_DIR")
|
||||
.or_else(|| std::env::var_os("OUT_DIR"))
|
||||
.expect("BAT_ASSETS_GEN_DIR or OUT_DIR to be set in build.rs");
|
||||
let out_dir = Path::new(&out_dir_env);
|
||||
|
||||
fs::create_dir_all(out_dir.join("assets/manual")).unwrap();
|
||||
|
Loading…
Reference in New Issue
Block a user