|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- @echo off
-
- set maps_dir=sas.maps
- set maps_url="https://github.com/sasgis/sas.maps"
-
- git status
-
- echo %ERRORLEVEL%
-
- if ERRORLEVEL 9009 goto NoGit
- if ERRORLEVEL 128 goto CloneRepo
- if ERRORLEVEL 0 goto UpdateRepo
- if ERRORLEVEL -1 goto CloneRepo
-
- goto err
-
- :CloneRepo
- echo ९ ࢥ
- rd /s /q %maps_dir%
- git clone %maps_url% %maps_dir%
- if not ERRORLEVEL 0 goto err
-
- echo 㥬 ९ਥ ⥪
- xcopy /i /s /h /e /y %maps_dir%\.git .\.git
- if not ERRORLEVEL 0 goto ErrorCopyGit
-
- echo 塞 ६ ᮧ
- rd /s /q %maps_dir%
- if not ERRORLEVEL 0 goto ErrorRemoveTemp
- goto UpdateRepo
-
- :UpdateRepo
- echo 塞 䠩 ᨨ
- git fetch --all --verbose
- git clean -d -x --force
- git reset --hard origin/master
- goto end
-
- :err
- echo 訡 裡 ࢥ
- goto end
-
- :ErrorCopyGit
- echo 訡 .git
- goto end
-
- :ErrorRemoveTemp
- echo 訡 㤠 ६ sas.maps
- goto end
-
- :NoGit
- echo 訡: ⠭ Git
- goto end
-
- :end
- pause
|