-
Notifications
You must be signed in to change notification settings - Fork 7
/
build-arch
executable file
路30 lines (24 loc) 路 768 Bytes
/
build-arch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
set -e
BIN="crypteia-${BUILD_ARCH}"
LIB="libcrypteia-${BUILD_ARCH}.so"
rm -rf "./build/${BIN}"
rm -rf "./build/${BIN}.zip"
rm -rf "./build/{$LIB}"
rm -rf "./build/libcrypteia-${BUILD_ARCH}.zip"
cargo build \
--release \
--target x86_64-unknown-linux-gnu
cp ./target/x86_64-unknown-linux-gnu/release/crypteia "./build/${BIN}"
cp ./target/x86_64-unknown-linux-gnu/release/libcrypteia.so "./build/${LIB}"
cd ./build
strip "$BIN"
chmod +x "$BIN"
zip -r "${BIN}.zip" "$BIN"
zip -r "libcrypteia-${BUILD_ARCH}.zip" "$LIB"
cd ..
rm -rf ./package/opt
mkdir -p ./package/opt/extensions
mkdir -p ./package/opt/lib
cp "./build/crypteia-${BUILD_ARCH}" ./package/opt/extensions/crypteia
cp "./build/libcrypteia-${BUILD_ARCH}.so" ./package/opt/lib/libcrypteia.so