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.

55 rivejä
1.2 KiB

  1. @echo off
  2. set maps_dir=sas.maps
  3. set maps_url="https://github.com/sasgis/sas.maps"
  4. git fetch --verbose %maps_url%
  5. echo %ERRORLEVEL%
  6. if ERRORLEVEL 9009 goto NoGit
  7. if ERRORLEVEL 128 goto CloneRepo
  8. if ERRORLEVEL 0 goto UpdateRepo
  9. if ERRORLEVEL -1 goto CloneRepo
  10. goto err
  11. :CloneRepo
  12. echo „¥« ¥¬ ª«®­ ९®§¨â®à¨ï á á¥à¢¥à 
  13. rd /s /q %maps_dir%
  14. git clone %maps_url% %maps_dir%
  15. if not ERRORLEVEL 0 goto err
  16. echo Š®¯¨à㥬 ¯ ¯ªã á ९®§¨â®à¨¥¬ ¨§ ¯®¤¯ ¯ª¨ ¢ ⥪ãéãî ¯ ¯ªã
  17. xcopy /i /s /h /e /y %maps_dir%\.git .\.git
  18. if not ERRORLEVEL 0 goto ErrorCopyGit
  19. echo “¤ «ï¥¬ ¢à¥¬¥­­® ᮧ¤ ­­ãî ¯®¤¯ ¯ªã
  20. rd /s /q %maps_dir%
  21. if not ERRORLEVEL 0 goto ErrorRemoveTemp
  22. goto UpdateRepo
  23. :UpdateRepo
  24. echo Ž¡­®¢«ï¥¬ ä ©«ë ¤® ¯®á«¥¤­¥© ¢¥àᨨ
  25. git clean -d --force
  26. git reset --hard
  27. goto end
  28. :err
  29. echo Žè¨¡ª  á¢ï§¨ á á¥à¢¥à®¬
  30. goto end
  31. :ErrorCopyGit
  32. echo Žè¨¡ª  ª®¯¨à®¢ ­¨ï ¯ ¯ª¨ .git
  33. goto end
  34. :ErrorRemoveTemp
  35. echo Žè¨¡ª  㤠«¥­¨ï ¢à¥¬¥­­®© ¯ ¯ª¨ sas.maps
  36. goto end
  37. :NoGit
  38. echo Žè¨¡ª : �¥ ãáâ ­®¢«¥­ Git
  39. goto end
  40. :end
  41. pause