forked from KSP-ModularManagement/ModuleManager
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·48 lines (39 loc) · 1.05 KB
/
Copy pathdeploy.sh
File metadata and controls
executable file
·48 lines (39 loc) · 1.05 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
#!/usr/bin/env bash
source ./CONFIG.inc
check() {
if [ ! -d "./GameData/$TARGETBINDIR/" ] ; then
rm -f "./GameData/$TARGETBINDIR/"
mkdir -p "./GameData/$TARGETBINDIR/"
fi
}
deploy_dev() {
local DLL=$1.dll
if [ -f "./bin/Release/$DLL" ] ; then
cp "./bin/Release/$DLL" "$LIB"
fi
}
deploy() {
local DLL=$1.dll
if [ -f "./bin/Release/$DLL" ] ; then
cp "./bin/Release/$DLL" "./GameData/$TARGETBINDIR/"
if [ -d "${KSP_DEV}/GameData/$TARGETBINDIR/" ] ; then
cp "./bin/Release/$DLL" "${KSP_DEV/}GameData/$TARGETBINDIR/"
fi
fi
if [ -f "./bin/Debug/$DLL" ] ; then
if [ -d "${KSP_DEV}/GameData/$TARGETBINDIR/" ] ; then
cp "./bin/Debug/$DLL" "${KSP_DEV}GameData/$TARGETBINDIR/"
fi
fi
}
VERSIONFILE=$PACKAGE.version
check
cp $VERSIONFILE "./GameData/$TARGETDIR"
cp CHANGE_LOG.md "./GameData/$TARGETDIR/$PACKAGE.CHANGE_LOG.md"
cp README.md "./GameData/$TARGETDIR/$PACKAGE.README.md"
cp LICENSE "./GameData/$TARGETDIR/$PACKAGE.LICENSE"
cp NOTICE "./GameData/$TARGETDIR/$PACKAGE.NOTICE"
for dll in $PACKAGE ; do
deploy_dev $dll
deploy $dll
done