forked from mifki/df-webfort
-
Notifications
You must be signed in to change notification settings - Fork 10
/
package.sh
executable file
·42 lines (33 loc) · 942 Bytes
/
package.sh
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
#!/bin/sh
# Build script for windows, written in unix :P
# This file is a part of Web Fortress
# (c) 2014 Kyle Mclamb <[email protected]>
DF_VER="40.19"
if [ ! -r "$1" ]; then
echo "Invalid file: $1"
echo "Usage: $0 <Path to webfort.plug.dll>"
exit 1
fi
rm -rf package
mkdir -v package
mkdir -vp package/hack/plugins
cp -v "$1" package/hack/plugins/
cp -vr dist/shared/* package/
cp -vr dist/$DF_VER/* package/
cp -vr static package/web
cp_prefixed() {
cp -v $1 package/WF-$1
}
cp_prefixed README.md
cp_prefixed INSTALLING.txt
cp_prefixed LICENSE
echo "## CLIENT ##" >> package/WF-USING.txt
cat static/README.md >> package/WF-USING.txt
echo "" >> package/WF-USING.txt
echo "## SERVER ##" >> package/WF-USING.txt
cat server/README.md >> package/WF-USING.txt
zipname="webfort-$(git describe --tag)-df0.$DF_VER-win32.zip"
rm -v "$zipname"
(cd package && zip -r "../$zipname" ./*)
rm -rf package
echo "$zipname: Done."