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.
|
- @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
|