From 6fd0a47beb53d125299c97846fbc583828ba1e14 Mon Sep 17 00:00:00 2001 From: OSPanel <93676052+OSPanel@users.noreply.github.com> Date: Sun, 14 Apr 2024 10:05:09 +0300 Subject: [PATCH] Create tail.bat --- system/templates/tail.bat | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 system/templates/tail.bat diff --git a/system/templates/tail.bat b/system/templates/tail.bat new file mode 100644 index 000000000..94946e769 --- /dev/null +++ b/system/templates/tail.bat @@ -0,0 +1,19 @@ +@echo off +set "ESC=" +setlocal enabledelayedexpansion +set "width=" +for /f "tokens=2 delims=:" %%a in ('mode con^|more +4') do if not defined width set /a width=%%a +for /l %%a in (1,1,%width%) do set "line=!line!─" +if exist "%1" for %%S in ("%1") do if %%~zS==0 ( + echo %ESC%[90m%line%%ESC%[0m + echo {lang_journal} %1 ^({lang_empty_log}^) + echo %ESC%[90m%line%%ESC%[0m +) else ( + echo %ESC%[90m%line%%ESC%[0m + echo {lang_journal} %1 + echo %ESC%[90m%line%%ESC%[0m + "{root_dir}\system\bin\tail.exe" %1 -%2 | "{root_dir}\system\bin\bat.exe" -f -l log --style=plain --theme=ansi + echo: + echo %ESC%[90m%line%%ESC%[0m +) +endlocal