forked from cjdelisle/cjdns
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdo
More file actions
executable file
·24 lines (22 loc) · 708 Bytes
/
do
File metadata and controls
executable file
·24 lines (22 loc) · 708 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
#!/bin/sh
set -e
export PATH="$HOME/.cargo/bin:$PATH"
CARGO="$(command -v cargo)"
if [ -z "$CARGO" ]; then
printf "Rust & Cargo are required in order to build cjdns\n"
printf "See https://rustup.rs/ for install instructions\n"
exit 1
fi
release="--release"
path="release"
if echo "$@" | grep -q '\-\-debug'; then
release=""
path="debug"
fi
RUSTFLAGS="$RUSTFLAGS -g" $CARGO build $release
RUST_BACKTRACE=1 "./target/$path/testcjdroute" all >/dev/null
if ! mv -- "./target/$path/cjdroute" "./target/$path/cjdnstool" ./; then
printf "Cannot find executables at %s\n" "./target/$path"
exit 1
fi
printf "\x1b[1;32mBuild completed successfully, type ./cjdroute to begin setup.\x1b[0m\n"