Skip to content

Commit

Permalink
Merge pull request #219 from Maneren/master
Browse files Browse the repository at this point in the history
Respect $CARGO_TARGET_DIR
  • Loading branch information
EpsilonKu authored Apr 22, 2024
2 parents 99636c7 + f37b8c6 commit 454c807
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ cd spectre_oxi

cargo build --release

[ "$CARGO_TARGET_DIR" = "" ] && CARGO_TARGET_DIR=target

if [ "$(uname)" == "Darwin" ]; then
cp target/release/libspectre_oxi.dylib ../lua/spectre_oxi.so
cp "$CARGO_TARGET_DIR"/release/libspectre_oxi.dylib ../lua/spectre_oxi.so
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
cp target/release/libspectre_oxi.so ../lua/spectre_oxi.so
cp "$CARGO_TARGET_DIR"/release/libspectre_oxi.so ../lua/spectre_oxi.so
elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then
cp target/release/libspectre_oxi.dll ../lua/spectre_oxi.dll
cp "$CARGO_TARGET_DIR"/release/libspectre_oxi.dll ../lua/spectre_oxi.dll
fi
rm -rf target
echo "Build Done"


0 comments on commit 454c807

Please sign in to comment.