-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlaunch.sh
More file actions
executable file
·35 lines (33 loc) · 1.12 KB
/
Copy pathlaunch.sh
File metadata and controls
executable file
·35 lines (33 loc) · 1.12 KB
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
#!/bin/bash
# Launch the unified FeCIM Visualizer
# Usage: ./launch.sh [--logger [LEVEL]] [--verbosity LEVEL] [--clear]
# --logger: Enable file logging (logs to logs/ directory)
# Optional shorthand: --logger debug|info|trace|off
# --verbosity LEVEL: Set logging verbosity (only used with --logger)
# LEVEL: 0|off, 1|info, 2|debug, 3|trace
# --clear: Delete logs/ and docs/assets/screenshots/ folders before running
cd "$(dirname "$0")"
# Check for --clear flag and remove it from args passed to the app
CLEAR_FLAG=false
ARGS=()
for arg in "$@"; do
if [[ "$arg" == "--clear" ]]; then
CLEAR_FLAG=true
else
ARGS+=("$arg")
fi
done
# Clear logs and screenshots if requested
if $CLEAR_FLAG; then
echo "Clearing logs/ and docs/assets/screenshots/ directories..."
rm -rf logs/ docs/assets/screenshots/
fi
rm -f fecim-lattice-tools
echo "Building fecim-lattice-tools (Fyne, Fyne desktop)..."
if CGO_ENABLED=0 go build -v -o fecim-lattice-tools ./cmd/fecim-lattice-tools 2>&1; then
echo "Build successful, launching..."
./fecim-lattice-tools "${ARGS[@]}"
else
echo "Build failed!"
exit 1
fi