diff options
author | Florian Franzmann | 2020-01-09 19:20:59 +0100 |
---|---|---|
committer | Florian Franzmann | 2020-01-09 22:01:04 +0100 |
commit | 4880d12c351033eb7d0334cd109f9f95e505b15d (patch) | |
tree | cb76eff18b79435e70ae60f6aa3a6ead9e71fcdd /rust-crates | |
parent | a73b1cf4ac6a3ca7de645455fbbd15ad13aeab2a (diff) |
rust-crates/FUNCTIONS: fix build/install by specifying CARGO_HOME
Diffstat (limited to 'rust-crates')
-rwxr-xr-x | rust-crates/FUNCTIONS | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/rust-crates/FUNCTIONS b/rust-crates/FUNCTIONS index bf7fb8c9f3..cba2919d0e 100755 --- a/rust-crates/FUNCTIONS +++ b/rust-crates/FUNCTIONS @@ -2,14 +2,17 @@ ## Section-default build script. #------------------------------------------------------------------------- function default_build_cargo() { - cargo build + env CARGO_HOME="$SOURCE_DIRECTORY/cargo_home" cargo build --release } #------------------------------------------------------------------------- ## Section-default install script. #------------------------------------------------------------------------- function default_install_cargo() { - cargo install --root "${INSTALL_ROOT}/usr" + env CARGO_HOME="$SOURCE_DIRECTORY/cargo_home" \ + cargo install --path "$SOURCE_DIRECTORY" --root "${INSTALL_ROOT}/usr" --locked $@ && + rm -f "$INSTALL_ROOT/usr/.crates.toml" && + rm -f "$INSTALL_ROOT/usr/.crates2.json" } function default_build() { |