Skip to content

Commit

Permalink
build: fix build script to run to only copy tika-native when not found
Browse files Browse the repository at this point in the history
  • Loading branch information
nmammeri committed Sep 11, 2024
1 parent 474c95b commit fda299c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions extractous-core/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,14 @@ fn main() {

// Because build script are not allowed to change files outside of OUT_DIR
// we need to copy the tika-native source directory to OUT_DIR and call gradle build there
fs_extra::dir::copy(&tika_native_source_dir, &out_dir, &fs_extra::dir::CopyOptions::new())
if !tika_native_dir.is_dir() {
fs_extra::dir::copy(
&tika_native_source_dir,
&out_dir,
&fs_extra::dir::CopyOptions::new(),
)
.expect("Failed to copy tika-native source to OUT_DIR");
}

// Just for debugging
// let graal_home = env::var("GRAALVM_HOME");
Expand Down Expand Up @@ -269,4 +275,4 @@ pub fn install_graalvm_ce(install_dir: &PathBuf) -> PathBuf {
}

install_dir.join(main_dir)
}
}

0 comments on commit fda299c

Please sign in to comment.