-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·19 lines (15 loc) · 694 Bytes
/
setup.sh
File metadata and controls
executable file
·19 lines (15 loc) · 694 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env bash
# RustFox setup wizard entry point.
#
# Usage:
# ./setup.sh # Opens browser-based wizard on http://localhost:8719
# ./setup.sh --cli # Interactive terminal wizard
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
BINARY="$SCRIPT_DIR/target/release/setup"
# Build the setup binary if it isn't present or is older than its source.
if [[ ! -f "$BINARY" ]] || [[ "$SCRIPT_DIR/src/bin/setup.rs" -nt "$BINARY" ]] || [[ "$SCRIPT_DIR/setup/index.html" -nt "$BINARY" ]]; then
echo "Building setup wizard…"
cargo build --release --bin setup --manifest-path "$SCRIPT_DIR/Cargo.toml"
fi
RUSTFOX_ROOT="$SCRIPT_DIR" "$BINARY" "$@"