-
Notifications
You must be signed in to change notification settings - Fork 1
/
InstallPackages.bat
96 lines (78 loc) · 2.65 KB
/
InstallPackages.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
@echo off
if not exist "npl_packages" ( mkdir npl_packages )
pushd "npl_packages"
rem if exist WorldShare (
rem pushd WorldShare
rem git checkout dev
rem git pull
rem popd
rem ) else (
rem git clone -b dev ssh://git@code.kp-para.cn:10022/paracraft/worldshare.git
rem )
REM set GitHubURL=https://github.com/
set GitHubURL=git@github.com:
set GitLabURL=ssh://git@code.kp-para.cn:10022/
if "%1" equ "dev" (
@REM CALL :InstallPackageGitLab WorldShare paracraft/worldshare.git dev
CALL :InstallPackage AutoUpdater NPLPackages/AutoUpdater dev
@REM CALL :InstallPackage GeneralGameServerMod tatfook/GeneralGameServerMod dev
) else (
@REM CALL :InstallPackageGitLab WorldShare paracraft/worldshare.git master
CALL :InstallPackage AutoUpdater NPLPackages/AutoUpdater master
@REM CALL :InstallPackage GeneralGameServerMod tatfook/GeneralGameServerMod master
)
CALL :InstallPackage STLExporter LiXizhi/STLExporter
CALL :InstallPackage BMaxToParaXExporter tatfook/BMaxToParaXExporter
CALL :InstallPackage NPLCAD tatfook/NPLCAD
CALL :InstallPackage NplCadLibrary NPLPackages/NplCadLibrary
CALL :InstallPackage ModelVoxelizer NPLPackages/ModelVoxelizer
CALL :InstallPackage NplCad2 tatfook/NplCad2
rem CALL :InstallPackage ExplorerApp tatfook/ExplorerApp
CALL :InstallPackage EMapMod tatfook/EMapMod
CALL :InstallPackage CodeBlockEditor tatfook/CodeBlockEditor
CALL :InstallPackage PluginBlueTooth NPLPackages/PluginBlueTooth
CALL :InstallPackage GoogleAnalytics NPLPackages/GoogleAnalytics
CALL :InstallPackage ParaWorldClient tatfook/ParaworldClient
CALL :InstallPackage Agents NPLPackages/Agents
rem CALL :InstallPackage PyRuntime tatfook/PyRuntime
CALL :InstallPackage NplMicroRobot tatfook/NplMicroRobot
CALL :InstallPackage HaqiMod tatfook/HaqiMod
CALL :InstallPackage Microbit tatfook/Microbit
CALL :InstallPackage CodePkuCommon tatfook/CodePkuCommon.git
CALL :InstallPackage CodePku tatfook/CodePku.git
popd
EXIT /B %ERRORLEVEL%
rem install function here
:InstallPackage
if exist "%1\README.md" (
pushd %1
echo.
echo check update for: %1
git remote set-url origin %GitHubURL%%2
git reset --hard
if "%3" neq "" (
git checkout -B %3 origin/%3
)
git pull
popd
) else (
rmdir /s /q "%CD%\%1"
git clone %GitHubURL%%2
)
goto:eof
:InstallPackageGitLab
if exist "%1\README.md" (
pushd %1
echo.
echo check update for: %1
git reset --hard
if "%3" neq "" (
git checkout -B %3 origin/%3
)
git pull
popd
) else (
rmdir /s /q "%CD%\%1"
git clone %GitLabURL%%2
)
goto:eof