You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 rivejä
1.3 KiB

  1. @echo off
  2. set ubk=Update.bk.cmd
  3. if not "%1"=="run" (
  4. copy /y "%~0" %ubk%
  5. %ubk% run
  6. del /f /q %ubk%
  7. )
  8. set maps_dir=sas.maps
  9. set maps_url="http://parasite.kicks-ass.org:3000/sasgis/maps.git"
  10. git version
  11. echo Return code: %ERRORLEVEL%
  12. if ERRORLEVEL 9009 (
  13. echo Žè¨¡ª : �¥ ãáâ ­®¢«¥­ Git
  14. start "" "https://git-scm.com/downloads"
  15. goto end
  16. )
  17. if not exist ".git\" (
  18. goto CloneRepo
  19. ) else (
  20. goto UpdateRepo
  21. )
  22. :CloneRepo
  23. echo „¥« ¥¬ ª«®­ ९®§¨â®à¨ï á á¥à¢¥à 
  24. rd /s /q %maps_dir%
  25. git clone %maps_url% %maps_dir%
  26. if not ERRORLEVEL 0 (
  27. echo Žè¨¡ª  á¢ï§¨ á á¥à¢¥à®¬
  28. goto end
  29. )
  30. echo Š®¯¨à㥬 ¯ ¯ªã á ९®§¨â®à¨¥¬ ¨§ ¯®¤¯ ¯ª¨ ¢ ⥪ãéãî ¯ ¯ªã
  31. xcopy /i /s /h /e /y %maps_dir%\.git .\.git
  32. if not ERRORLEVEL 0 (
  33. echo Žè¨¡ª  ª®¯¨à®¢ ­¨ï ¯ ¯ª¨ .git
  34. goto end
  35. )
  36. echo “¤ «ï¥¬ ¢à¥¬¥­­® ᮧ¤ ­­ãî ¯®¤¯ ¯ªã
  37. rd /s /q %maps_dir%
  38. if not ERRORLEVEL 0 (
  39. echo Žè¨¡ª  㤠«¥­¨ï ¢à¥¬¥­­®© ¯ ¯ª¨ sas.maps
  40. goto end
  41. )
  42. goto UpdateRepo
  43. :UpdateRepo
  44. echo Ž¡­®¢«ï¥¬ ä ©«ë ¤® ¯®á«¥¤­¥© ¢¥àᨨ
  45. git fetch --all --verbose
  46. git clean -d -x --force --exclude="%ubk%"
  47. git reset --hard origin/master
  48. goto end
  49. :end
  50. pause