0
0
mirror of https://github.com/cjdelisle/cjdns synced 2025-10-05 16:22:54 +02:00

x-prefix in comparisons no longer serves a purpose

This commit is contained in:
wiryhatbox
2024-07-03 18:23:18 +03:00
parent df75abe773
commit 94b7545145

15
do
View File

@@ -1,8 +1,10 @@
#!/bin/sh
export PATH=$HOME/.cargo/bin:$PATH
CARGO=$(command -v cargo)
set -e
if test "x$CARGO" = "x"; then
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
@@ -14,6 +16,9 @@ if echo "$@" | grep -q '\-\-debug'; then
path="debug"
fi
RUSTFLAGS="$RUSTFLAGS -g" $CARGO build $release
RUST_BACKTRACE=1 ./target/$path/testcjdroute all >/dev/null
mv ./target/$path/cjdroute ./target/$path/cjdnstool ./
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"