-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathInstallPackages.sh
More file actions
executable file
·102 lines (84 loc) · 2.55 KB
/
InstallPackages.sh
File metadata and controls
executable file
·102 lines (84 loc) · 2.55 KB
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
97
98
99
100
101
102
#!/bin/bash
# author: lixizhi@yeah.net
# date: 2019.7.25
GitURL=https://github.com/
# GitURL=git@github.com:
GitLabURL=ssh://git@code.kp-para.cn:10022/
# param1 is folder name
# param2 is github url
function InstallPackage()
{
if [ -f "$1/README.md" ]; then
pushd $1
git remote set-url origin $GitURL$2
git reset --hard
if [ ! -z $3 ]; then
git checkout -B $3 origin/$3
fi
git pull
popd
else
rm -rf "./$1"
git clone $GitURL$2
fi
}
function InstallPackageGitLab()
{
if [ -f "$1/README.md" ]; then
pushd $1
echo check update for: $1
git reset --hard
if [ ! -z $3 ]; then
git checkout -B $3 origin/$3
fi
git pull
popd
else
rm -rf "./$1"
git clone $GitLabURL$2
if [ ! -z $3 ]; then
git checkout -B $3 origin/$3
fi
fi
}
if [ ! -d npl_packages ]; then
mkdir npl_packages
fi
pushd npl_packages
# if [ -d "WorldShare" ]; then
# pushd "WorldShare"
# git reset --hard
# git pull
# popd
# else
# git clone ssh://git@code.kp-para.cn:10022/paracraft/worldshare.git WorldShare
# fi
if [ "$1" = "dev" ]; then
# InstallPackageGitLab WorldShare paracraft/worldshare.git dev
InstallPackage AutoUpdater NPLPackages/AutoUpdater dev
# InstallPackage GeneralGameServerMod tatfook/GeneralGameServerMod dev
else
# InstallPackageGitLab WorldShare paracraft/worldshare.git master
InstallPackage AutoUpdater NPLPackages/AutoUpdater master
# InstallPackage GeneralGameServerMod tatfook/GeneralGameServerMod master
fi
InstallPackage STLExporter LiXizhi/STLExporter
InstallPackage BMaxToParaXExporter tatfook/BMaxToParaXExporter
InstallPackage NPLCAD tatfook/NPLCAD
InstallPackage NplCadLibrary NPLPackages/NplCadLibrary
InstallPackage ModelVoxelizer NPLPackages/ModelVoxelizer
InstallPackage NplCad2 tatfook/NplCad2
# InstallPackage ExplorerApp tatfook/ExplorerApp
InstallPackage EMapMod tatfook/EMapMod
InstallPackage CodeBlockEditor tatfook/CodeBlockEditor
InstallPackage PluginBlueTooth NPLPackages/PluginBlueTooth
InstallPackage GoogleAnalytics NPLPackages/GoogleAnalytics
InstallPackage ParaWorldClient tatfook/ParaworldClient
InstallPackage Agents NPLPackages/Agents
# InstallPackage PyRuntime tatfook/PyRuntime
InstallPackage NplMicroRobot tatfook/NplMicroRobot
InstallPackage HaqiMod tatfook/HaqiMod
InstallPackage Microbit tatfook/Microbit
InstallPackage CodePkuCommon tatfook/CodePkuCommon.git
InstallPackage CodePku tatfook/CodePku.git
popd