UPDATE.BTM 736 B

12345678910111213141516171819202122232425262728293031323334
  1. @echo off
  2. setlocal
  3. iff exist bsource.zip then
  4. inkey /k"ac[Esc]" BSOURCE.ZIP exists. Add files, or Create new archive (A/C)? %%key
  5. if "%key"=="c" del bsource.zip > nul
  6. if "%key"=="" quit
  7. endiff
  8. iff EXIST UPDATE.DAT then
  9. set lastAge=%@FILEAGE[UPDATE.DAT]
  10. else
  11. set lastAge=0
  12. endiff
  13. set tempFile=%@UNIQUE[]
  14. set hFile=%@FILEOPEN[%tempFile, WRITE]
  15. for %fname in (makefile src\*.asm src\*.h src\*.c?? *.txt *.btm *.rfs names.h seq\*.seq qav\*.qav) do (
  16. if %@FILEAGE[%fname] GT %lastAge (
  17. set r=%@FILEWRITE[%hFile, %fname]
  18. set changed=TRUE
  19. )
  20. )
  21. set r=%@FILECLOSE[%hFile]
  22. if "%changed"=="TRUE" (
  23. pkzip -o -P -selcycer bsource @%tempFile
  24. wtouch update.dat /f bsource.zip
  25. )
  26. del %tempFile > nul