Skip to content

Open source CapCut alternative.

TypeScript

Quiet Donkey dev log output

David Led277f435372e
diff --git a/scripts/run-donkey-dev.sh b/scripts/run-donkey-dev.sh
index ab0d7e6e..cd80c107 100755
--- a/scripts/run-donkey-dev.sh
+++ b/scripts/run-donkey-dev.sh
@@ -4,6 +4,7 @@ set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
APP_DIR="$ROOT_DIR/apps/Donkey"
LOG_SCRIPT="$ROOT_DIR/scripts/tail-donkey-logs.sh"
+DONKEY_BIN="$APP_DIR/.build/debug/Donkey"
LOG_PID=""
cleanup() {
@@ -57,8 +58,13 @@ killall Donkey >/dev/null 2>&1 || true
cd "$APP_DIR"
echo "Building Donkey..."
-swift build
+swift build --quiet
+
+if [ ! -x "$DONKEY_BIN" ]; then
+ echo "Built Donkey executable was not found at $DONKEY_BIN." >&2
+ exit 1
+fi
echo "Starting Donkey..."
start_logger
-swift run Donkey
+"$DONKEY_BIN"
diff --git a/scripts/tail-donkey-logs.sh b/scripts/tail-donkey-logs.sh
index 844df213..a207ccce 100755
--- a/scripts/tail-donkey-logs.sh
+++ b/scripts/tail-donkey-logs.sh
@@ -154,6 +154,11 @@ if [ "$INCLUDE_DEBUG" -eq 1 ]; then
LOG_COMMAND+=(--debug)
fi
-echo "Predicate: $PREDICATE" >&2
-echo "Press Ctrl-C to stop." >&2
-exec "${LOG_COMMAND[@]}"
+exec "${LOG_COMMAND[@]}" 2> >(
+ while IFS= read -r line || [ -n "$line" ]; do
+ if [[ "$line" == "Filtering the log data using "* ]]; then
+ continue
+ fi
+ printf '%s\n' "$line" >&2
+ done
+)