ketarinupdate.cmd 858 B

1234567891011121314151617181920212223242526272829
  1. @echo off
  2. SET DIR=%~dp0%
  3. For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c%%a%%b)
  4. For /f "tokens=1-2 delims=/:" %%a in ("%TIME%") do (set mytime=%%a%%b)
  5. echo Updating the github repo first
  6. pushd %DIR%
  7. call git add --all :/
  8. call git commit -m "updates prior to automatic run for %mydate%_%mytime%"
  9. ::call git reset --hard HEAD
  10. call git fetch && git rebase origin/master
  11. call git push origin master
  12. popd
  13. :: /database="%DIR%\jobs.db"
  14. ::import all the files
  15. FOR /f "tokens=*" %%F IN ('dir %DIR%..\ /b *.ketarin.xml') DO (
  16. call ketarin.exe /import="%DIR%..\%%F"
  17. TIMEOUT /T 2
  18. )
  19. Echo Wait for all of those to finish importing...
  20. TIMEOUT /T 15
  21. echo Calling ketarin now the the repo has been updated
  22. call "Ketarin.exe" /silent /notify /log=C:\ProgramData\chocolateypackageupdater\ketarin.%mydate%_%mytime%.log