Skip to content

Commit f37b8c6

Browse files
committed
respect $CARGO_TARGET_DIR
1 parent 2b01255 commit f37b8c6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

build.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ cd spectre_oxi
66

77
cargo build --release
88

9+
[ "$CARGO_TARGET_DIR" = "" ] && CARGO_TARGET_DIR=target
10+
911
if [ "$(uname)" == "Darwin" ]; then
10-
cp target/release/libspectre_oxi.dylib ../lua/spectre_oxi.so
12+
cp "$CARGO_TARGET_DIR"/release/libspectre_oxi.dylib ../lua/spectre_oxi.so
1113
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
12-
cp target/release/libspectre_oxi.so ../lua/spectre_oxi.so
14+
cp "$CARGO_TARGET_DIR"/release/libspectre_oxi.so ../lua/spectre_oxi.so
1315
elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then
14-
cp target/release/libspectre_oxi.dll ../lua/spectre_oxi.dll
16+
cp "$CARGO_TARGET_DIR"/release/libspectre_oxi.dll ../lua/spectre_oxi.dll
1517
fi
1618
rm -rf target
1719
echo "Build Done"
18-
19-

0 commit comments

Comments
 (0)