2015-06-04 16:01:29 +00:00
|
|
|
@setlocal
|
2015-10-01 13:38:48 +00:00
|
|
|
@set TMPWV=win64
|
2015-06-04 16:01:29 +00:00
|
|
|
@set TMPSRC=../..
|
2015-07-01 13:50:19 +00:00
|
|
|
@set TMPNAME=tidy
|
2015-06-04 16:01:29 +00:00
|
|
|
@set TMPFIL=%TMPSRC%\version.txt
|
|
|
|
@if NOT EXIST %TMPFIL% goto NOFIL
|
|
|
|
@set /p TMPVER=<%TMPFIL%
|
2015-06-09 13:27:26 +00:00
|
|
|
@set DOPAUSE=pause
|
2015-06-04 16:01:29 +00:00
|
|
|
|
|
|
|
@echo Version %TMPVER%
|
|
|
|
|
|
|
|
@set TMPBIN=F:\Projects\tidy-bins
|
|
|
|
@set TMPBINS=%TMPBIN%\binaries
|
|
|
|
@if NOT EXIST %TMPBINS%\nul goto NOBIN
|
|
|
|
@set TMPDD=%TMPBINS%\tidy-%TMPVER%
|
|
|
|
@if EXIST %TMPDD%\nul goto GOTDST
|
|
|
|
@echo.
|
|
|
|
@echo This is a NEW installation in %TMPDD%
|
|
|
|
:GOTDST
|
|
|
|
|
2015-06-09 13:27:26 +00:00
|
|
|
@if "%1x" == "NOPAUSEx" (
|
|
|
|
@set DOPAUSE=echo No pause requested...
|
|
|
|
)
|
|
|
|
|
2015-06-04 16:01:29 +00:00
|
|
|
@echo Will publish...
|
2015-10-01 13:38:48 +00:00
|
|
|
@set TMPCNT=0
|
|
|
|
@set TMPFIL1=%TMPNAME%-%TMPVER%-%TMPWV%.exe
|
|
|
|
@set TMPFIL2=%TMPNAME%-%TMPVER%-%TMPWV%.msi
|
|
|
|
@set TMPFIL3=%TMPNAME%-%TMPVER%-%TMPWV%.zip
|
|
|
|
@if EXIST %TMPFIL1% (
|
2015-06-04 16:01:29 +00:00
|
|
|
@echo %TMPFIL1%
|
2015-10-01 13:38:48 +00:00
|
|
|
@set /A TMPCNT+=1
|
|
|
|
)
|
|
|
|
@if EXIST %TMPFIL2% (
|
2015-06-04 16:01:29 +00:00
|
|
|
@echo %TMPFIL2%
|
2015-10-01 13:38:48 +00:00
|
|
|
@set /A TMPCNT+=1
|
|
|
|
)
|
|
|
|
@if EXIST %TMPFIL3% (
|
2015-06-04 16:01:29 +00:00
|
|
|
@echo %TMPFIL3%
|
2015-10-01 13:38:48 +00:00
|
|
|
@set /A TMPCNT+=1
|
|
|
|
)
|
|
|
|
@if "%TMPCNT%x" == "0x" goto NOPUB
|
|
|
|
@echo.
|
|
|
|
@echo Will publish %TMPCNT% files to %TMPDD%
|
2015-06-04 16:01:29 +00:00
|
|
|
@echo.
|
|
|
|
@echo *** CONTINUE?%
|
2015-06-09 13:27:26 +00:00
|
|
|
@%DOPAUSE%
|
2015-06-04 16:01:29 +00:00
|
|
|
|
|
|
|
@if NOT EXIST %TMPDD%\nul (
|
|
|
|
@md %TMPDD%
|
|
|
|
@if NOT EXIST %TMPDD%\nul goto NODST
|
|
|
|
)
|
|
|
|
|
2015-10-01 13:38:48 +00:00
|
|
|
@if EXIST %TMPFIL1% (
|
2015-06-04 16:01:29 +00:00
|
|
|
@set TMPSRC=%TMPFIL1%
|
|
|
|
@set TMPDST=%TMPDD%\%TMPFIL1%
|
|
|
|
@call :CHKCOPY
|
2015-10-01 13:38:48 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
@if EXIST %TMPFIL2% (
|
2015-06-04 16:01:29 +00:00
|
|
|
@set TMPSRC=%TMPFIL2%
|
|
|
|
@set TMPDST=%TMPDD%\%TMPFIL2%
|
|
|
|
@call :CHKCOPY
|
2015-10-01 13:38:48 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
@if EXIST %TMPFIL3% (
|
2015-06-04 16:01:29 +00:00
|
|
|
@set TMPSRC=%TMPFIL3%
|
|
|
|
@set TMPDST=%TMPDD%\%TMPFIL3%
|
|
|
|
@call :CHKCOPY
|
2015-10-01 13:38:48 +00:00
|
|
|
)
|
2015-06-04 16:01:29 +00:00
|
|
|
@echo.
|
2015-10-01 13:38:48 +00:00
|
|
|
@echo If done all bins, WIN32, WIN64, linux, ... maybe time to run 'gentidyyml %TMPBIN%'
|
2015-06-04 16:01:29 +00:00
|
|
|
@echo.
|
|
|
|
|
|
|
|
@goto END
|
|
|
|
|
|
|
|
:CHKCOPY
|
|
|
|
|
|
|
|
@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 :EOF
|
|
|
|
|
|
|
|
:NOFC4
|
|
|
|
@echo Can NOT run fc4! so doing copy...
|
|
|
|
:DOCOPY
|
|
|
|
copy %TMPSRC% %TMPDST%
|
|
|
|
@if NOT EXIST %TMPDST% goto ERR3
|
|
|
|
@call dirmin %TMPDST%
|
|
|
|
@echo.
|
|
|
|
@echo Done file update...
|
|
|
|
@echo.
|
|
|
|
@goto :EOF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
:NODST
|
|
|
|
@echo Error: Unable to create %TMPDD%
|
2015-10-01 13:38:48 +00:00
|
|
|
@goto END
|
2015-06-04 16:01:29 +00:00
|
|
|
|
2015-10-01 13:38:48 +00:00
|
|
|
:NOPUB
|
|
|
|
@echo Appears no files to PUBLISH!
|
2015-06-04 16:01:29 +00:00
|
|
|
:NOFIL1
|
|
|
|
@echo Can NOT locate %TMPFIL1%! *** FIX ME ***
|
|
|
|
:NOFIL2
|
|
|
|
@echo Can NOT locate %TMPFIL2%! *** FIX ME ***
|
|
|
|
:NOFIL3
|
|
|
|
@echo Can NOT locate %TMPFIL3%! *** FIX ME ***
|
|
|
|
@goto END
|
|
|
|
|
|
|
|
|
|
|
|
:NOFIL
|
|
|
|
@echo Can NOT locate %TMPFIL%! *** FIX ME ***
|
|
|
|
@goto END
|
|
|
|
|
|
|
|
:NOBIN
|
|
|
|
@echo Can NOT locate %TMPBINS%! *** FIX ME ***
|
|
|
|
@goto END
|
|
|
|
|
|
|
|
:END
|
|
|
|
|
|
|
|
@REM eof
|