From 11d8dbd952102a920b23b56ccdf2d1e74090c0c6 Mon Sep 17 00:00:00 2001 From: Geoff McLane Date: Tue, 27 Jan 2015 18:09:32 +0100 Subject: [PATCH] add convenient updexe.bat, until install used... --- build/cmake/updexe.bat | 57 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 build/cmake/updexe.bat diff --git a/build/cmake/updexe.bat b/build/cmake/updexe.bat new file mode 100644 index 0000000..e75b686 --- /dev/null +++ b/build/cmake/updexe.bat @@ -0,0 +1,57 @@ +@setlocal +@REM copy the EXE into C:\MDOS, IFF changed +@set TMPDIR=C:\MDOS +@set TMPFIL1=tidy5.exe +@set TMPFIL2=tidy5-32.exe +@set TMPSRC=Release\%TMPFIL1% +@if NOT EXIST %TMPSRC% goto ERR1 +@echo Current source %TMPSRC% +@call dirmin %TMPSRC% + +@if NOT EXIST %TMPDIR%\nul goto ERR2 +@set TMPDST=%TMPDIR%\%TMPFIL2% +@if NOT EXIST %TMPDST% goto DOCOPY + +@echo Current destination %TMPDST% +@call dirmin %TMPDST% + +@REM Compare +@fc4 -q -v0 -b %TMPSRC% %TMPDST% >nul +@if ERRORLEVEL 2 goto NOFC4 +@if ERRORLEVEL 1 goto DOCOPY +@echo. +@echo Files are the SAME... Nothing done... +@echo. +@goto END + +:NOFC4 +@echo Can NOT run fc4! so doing copy... +:DOCOPY +copy %TMPSRC% %TMPDST% +@if NOT EXIST %TMPDST% goto ERR3 +@call dirmin %TMPDST% +@echo Done file update... +@goto END + +:ERR1 +@echo Source %TMPSRC% does NOT exist! Has it been built? *** FIX ME *** +@goto ISERR + +:ERR2 +@echo Destination %TMPDIR% does NOT exist! +@goto ISERR + +:ERR3 +@echo Copy of %TMPSRC% to %TMPDST% FAILED! +@goto ISERR + +:ISERR +@endlocal +@exit /b 1 + +:END +@endlocal +@exit /b 0 + +@REM eof +