-
Notifications
You must be signed in to change notification settings - Fork 29
/
build.sh
41 lines (39 loc) · 757 Bytes
/
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
#!/bin/bash
org_pwd=$(cd `dirname $0`; pwd)
cd $org_pwd
# convert /d/aa/bb/cc -> d:\aa\bb\cc
# /d/aa/bb/cc
pwd=${org_pwd}
# d/aa/bb/cc
pwd=${pwd:1}
# d:\aa/bb/cc
pwd=${pwd/\//:\\}
# d:\aa\bb\cc
pwd=${pwd//\//\\}
# echo $pwd
if [ "$GOPATH" = "" ] ; then
export GOPATH="${pwd}"
else
GOPATH=$GOPATH";${pwd}"
fi
#env | grep GOPA
cd src/FKTrojan
echo 'go build Server.go ...'
go build Server.go
echo 'go build Client.go ...'
go build Client.go
mv -f *.exe ${pwd}/bin
cd client_tools/mysql_tools
echo 'go build mysql_tools ...'
go build
mv -f *.exe ${pwd}/bin
cd -
cd client_tools/scan_dir
go build
mv -f *.exe ${pwd}/bin
cd -
cd server_tools/command_tools
go build
mv -f *.exe ${pwd}/bin
echo "binary file in ${pwd}\\bin"
cp -f ${org_pwd}/bin/*.exe /d/bin/