Skip to content

Commit

Permalink
replace subdirectory by a build script
Browse files Browse the repository at this point in the history
  • Loading branch information
tibvdm committed Jun 15, 2024
1 parent 509380d commit d4a9363
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
target/
data/

libsais64-rs/libsais

.DS_Store
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

9 changes: 9 additions & 0 deletions libsais64-rs/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ fn exit_status_to_result(name: &str, exit_status: ExitStatus) -> Result<(), Comp
}

fn main() -> Result<(), Box<dyn Error>> {
// remove the old libsais folder
Command::new("rm").args(["-rf", "libsais"]).status().unwrap_or_default(); // if removing fails, it is since the folder did not exist, we just can ignore it

// clone the c library
Command::new("git")
.args(["clone", "https://github.com/IlyaGrebnov/libsais.git", "--depth=1"])
.status()
.expect("Failed to clone the libsais repository");

// compile the c library
Command::new("rm")
.args(["libsais/CMakeCache.txt"])
Expand Down
1 change: 0 additions & 1 deletion libsais64-rs/libsais
Submodule libsais deleted from 2e5f9c
11 changes: 0 additions & 11 deletions libsais64-rs/src/build.rs

This file was deleted.

0 comments on commit d4a9363

Please sign in to comment.