forked from visualfc/liteide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_freebsd.sh
executable file
·92 lines (69 loc) · 1.66 KB
/
build_freebsd.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
#!/bin/sh
export BUILD_ROOT=$PWD
if [ -z $LITEIDE_ROOT ]; then
export LITEIDE_ROOT=$PWD/../liteidex
fi
echo build liteide
echo QTDIR=$QTDIR
echo GOROOT=$GOROOT
echo BUILD_ROOT=$BUILD_ROOT
echo LITEIDE_ROOT=$LITEIDE_ROOT
echo .
if [ -z $QTDIR ]; then
echo 'error, QTDIR is null'
exit 1
fi
export PATH=$QTDIR/bin:$PATH
echo qmake liteide ...
echo .
qmake $LITEIDE_ROOT -spec freebsd-g++ "CONFIG+=release"
if [ $? -ge 1 ]; then
echo 'error, qmake fail'
exit 1
fi
echo make liteide ...
echo .
make
if [ $? -ge 1 ]; then
echo 'error, make fail'
exit 1
fi
go version
if [ $? -ge 1 ]; then
echo 'error, not find go in PATH'
exit 1
fi
echo build liteide tools ...
cd $LITEIDE_ROOT
if [ -z $GOPATH ]; then
export GOPATH=$PWD
else
export GOPATH=$PWD:$GOPATH
fi
go install -ldflags "-s" -v github.com/visualfc/gotools
if [ $? -ge 1 ]; then
echo 'error, go install fail'
exit 1
fi
go install -ldflags "-s" -v github.com/nsf/gocode
if [ $? -ge 1 ]; then
echo 'error, go install fail'
exit 1
fi
echo deploy ...
cd $BUILD_ROOT
rm -r liteide
mkdir -p liteide
mkdir -p liteide/bin
mkdir -p liteide/share/liteide
mkdir -p liteide/lib/liteide/plugins
cp -a -v $LITEIDE_ROOT/LICENSE.LGPL liteide
cp -a -v $LITEIDE_ROOT/LGPL_EXCEPTION.TXT liteide
cp -a -v $LITEIDE_ROOT/../README.md liteide
cp -a -v $LITEIDE_ROOT/../CONTRIBUTORS liteide
cp -a -v $LITEIDE_ROOT/liteide/bin/* liteide/bin
cp -a -v $LITEIDE_ROOT/bin/gotools liteide/bin
cp -a -v $LITEIDE_ROOT/bin/gocode liteide/bin
cp -a -v $LITEIDE_ROOT/liteide/lib/liteide/plugins/*.so liteide/lib/liteide/plugins
cp -r -v $LITEIDE_ROOT/deploy/* liteide/share/liteide/
cp -r -v $LITEIDE_ROOT/os_deploy/freebsd/* liteide/share/liteide/