forked from hanul93/kicomav
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·95 lines (76 loc) · 1.33 KB
/
build.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
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
#!/bin/bash
function jumpto
{
label=$1
cmd=$(sed -n "/$label:/{
:a
n
p
ba
};" $0 | grep -v ':$'
)
eval "$cmd"
exit
}
function print_logo
{
echo '------------------------------------------------------------'
echo 'KICOM Anti-Virus II (for Linux) Build Tool Ver 0.11'
echo 'Copyright (C) 1995-2017 Kei Choi. All rights reserved.'
echo '------------------------------------------------------------'
echo
}
start=${1:-"start"}
jumpto $start
start:
print_logo
echo 'Usage : builder.sh [build][erase]'
jumpto end
erase:
print_logo
echo '[*] Delete all files in Release'
if [ -d "Release" ]
then
rm -rf Release
fi
if [ -f "key.skr" ]
then
rm key.skr
fi
if [ -f "key.pkr" ]
then
rm key.pkr
fi
echo '[*] Delete Success'
jumpto end
build:
print_logo
echo '[*] Engine file copy to the Release folder...'
mkdir Release
cp -rf Engine/* Release
if [ ! -f "key.skr" ]
then
python Tools/mkkey.py
fi
if [ ! -f "key.pkr" ]
then
python Tools/mkkey.py
fi
cp key.* Release/plugins
cd Release/plugins
echo '[*] Build Engine files...'
python ../../Tools/kmake.py kicom.lst
for f in *.py
do
python ../../Tools/kmake.py "$f"
done
rm *.py
rm kicom.lst
rm key.skr
rm __init__.kmd
rm cab.kmd
rm nsis.kmd
cd ..
echo '[*] Build Success'
chmod 755 k2.py
end: