Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions runner.bat
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ if "%WATCH%"=="true" (
echo !YELLOW![WATCH] Watch mode enabled - save the file to rerun!RESET!
REM Capture initial timestamp
for %%F in ("%FILE%") do set "LAST_MOD=%%~tF"
cls
call :run
:watchloop
echo !YELLOW![WATCH] Waiting for changes... Press Ctrl+C to stop.!RESET!
timeout /t 2 /nobreak >nul
for %%F in ("%FILE%") do set "CURR_MOD=%%~tF"
if not "!CURR_MOD!"=="!LAST_MOD!" (
set "LAST_MOD=!CURR_MOD!"
echo !YELLOW![WATCH] Change detected...!RESET!
cls
call :run
)
goto :watchloop
Expand Down
5 changes: 3 additions & 2 deletions runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ run() {
# ── Watch mode ────────────────────────────────────────────────
if $WATCH; then
echo -e "${YELLOW}👁 Watch mode enabled - save the file to rerun${RESET}"
clear
run || true

if [[ "$PLATFORM" == "linux" ]]; then
Expand All @@ -134,7 +135,7 @@ if $WATCH; then
exit 1
fi
while inotifywait -q -e close_write "$FILE"; do
echo -e "\n${YELLOW}↻ Change detected...${RESET}"
clear
run || true
done

Expand All @@ -144,7 +145,7 @@ if $WATCH; then
exit 1
fi
fswatch -o "$FILE" | while read -r; do
echo -e "\n${YELLOW}↻ Change detected...${RESET}"
clear
run || true
done

Expand Down
Loading