forked from enarjord/passivbot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrustbuild.sh
More file actions
36 lines (28 loc) · 669 Bytes
/
rustbuild.sh
File metadata and controls
36 lines (28 loc) · 669 Bytes
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
31
32
33
34
35
36
#!/usr/bin/env bash
if [[ -z "${BASH_VERSION:-}" ]]; then
echo "This script must be run with bash (e.g. 'bash rustbuild.sh')." >&2
exit 1
fi
set -euo pipefail
show_help() {
cat <<'EOF'
Usage: rustbuild.sh [options]
Build and install the Rust extension in editable mode.
Options:
-h, --help Show this help message and exit.
The script runs:
cd passivbot-rust
cargo fmt
maturin develop --release
cd ..
EOF
}
if [[ "${1:-}" == "-h" || "${1:-}" == "--help" ]]; then
show_help
exit 0
fi
script_dir="$(cd -- "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$script_dir/passivbot-rust"
cargo fmt
maturin develop --release
cd "$script_dir"