forked from RPG-Paper-Maker/RPG-Paper-Maker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
update-mods
executable file
·75 lines (70 loc) · 2.18 KB
/
update-mods
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
#!/bin/bash
modsPath='./mods'
localMessage='Local copy: '
githubMessage='Github repository copy: '
moveSymbol='->'
if [ -d $modsPath ]; then
rm -r $modsPath
fi
mkdir mods
path='../Game/Content/Datas/Scripts'
pathModsScript="${modsPath}/Scripts"
if [ -d $path ]; then
echo "$localMessage $path $moveSymbol $pathModsScript"
cp -r $path $pathModsScript
else
pathGit="https://github.com/RPG-Paper-Maker/Game/trunk/Content/Datas/Scripts"
echo "$githubMessage $pathGit $moveSymbol $modsPath"
svn export $pathGit $pathModsScript
fi
path='../Game/main.js'
pathModsMain="${modsPath}/main.js"
if [ $path ]; then
echo "$localMessage $path $moveSymbol $pathModsMain"
cp -r $path $pathModsMain
else
pathGit="https://github.com/RPG-Paper-Maker/Game/trunk/main.js"
echo "$githubMessage $pathGit $moveSymbol $modsPath"
svn export $pathGit $pathModsMain
fi
path='../Game/index.html'
pathModsIndex="${modsPath}/index.html"
if [ $path ]; then
echo "$localMessage $path $moveSymbol $pathModsIndex"
cp -r $path $pathModsIndex
else
pathGit="https://github.com/RPG-Paper-Maker/Game/trunk/index.html"
echo "$githubMessage $pathGit $moveSymbol $modsPath"
svn export $pathGit $pathModsIndex
fi
path='../Game/package.json'
pathModsPackage="${modsPath}/package.json"
if [ $path ]; then
echo "$localMessage $path $moveSymbol $pathModsPackage"
cp -r $path $pathModsPackage
else
pathGit="https://github.com/RPG-Paper-Maker/Game/trunk/package.json"
echo "$githubMessage $pathGit $moveSymbol $modsPath"
svn export $pathGit $pathModsPackage
fi
path='../Basic-Ressources/Content'
pathModsBR="${modsPath}/BR/Content"
mkdir "${modsPath}/BR"
if [ -d $path ]; then
echo "$localMessage $path $moveSymbol $pathModsBR"
cp -r $path $pathModsBR
else
pathGit="https://github.com/RPG-Paper-Maker/Basic-Ressources/trunk/Content"
echo "$githubMessage $pathGit $moveSymbol $pathModsBR"
svn export $pathGit $pathModsBR
fi
path='../Dependencies/Game'
pathModsGame="${modsPath}/Game"
if [ -d $path ]; then
echo "$localMessage $path $moveSymbol $pathModsGame"
cp -r $path $pathModsGame
else
pathGit="https://github.com/RPG-Paper-Maker/Dependencies/trunk/Game"
echo "$githubMessage $pathGit $moveSymbol $pathModsGame"
svn export $pathGit $pathModsGame
fi