-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake.sh
More file actions
executable file
·77 lines (64 loc) · 1.18 KB
/
Copy pathmake.sh
File metadata and controls
executable file
·77 lines (64 loc) · 1.18 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
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
#!/bin/bash
export BUILDCMD=build
# SET LINKCMD=-ldflags="-s -w"
export LINKCMD=
echo $0 $1 $2
if [[ "$1" = "setup" ]]
then
echo Hämtar beroenden...
go get github.com/alexbrainman/odbc
go get github.com/mattn/go-sqlite3
go get golang.org/x/text/encoding/charmap
go get github.com/shopspring/decimal
go get github.com/extrame/xls
go get github.com/xuri/excelize/v2
go get github.com/pkg/browser
exit 0
fi
rm wHHEK wHHEK.exe wHHEK_x86.exe wHHEK_x64.exe
if [[ "$1" = "clean" ]]
then
rm *~
rm html\*~
rm #*#
rm .#*
rm *.ldb
rm got*.mdb
exit 0
fi
if [[ "$1" = "test" ]]
then
if [[ "$2" = "verbose" ]]
then
export BUILDCMD="test -v"
else
export BUILDCMD="test "
fi
else
export BUILDCMD="build"
fi
if [[ "$1" = "release" ]]
then
export LINKCMD="-ldflags -s -ldflags -w"
else
export LINKCMD=
fi
echo Bygger...
if [[ "$1" = "test" ]]
then
set -x
go $BUILDCMD $LINKCMD
set +x
else
echo Build native
set -x
go $BUILDCMD $LINKCMD
set +x
echo Build win32
export GOOS="windows"
export GOARCH="386"
set -x
go $BUILDCMD $LINKCMD -o wHHEK_x86.exe
set +x
fi
echo Klar.