Skip to content

Commit

Permalink
Adding compilation scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
XinRoom committed Apr 18, 2022
1 parent d38decd commit 230ebc8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build/build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set GOENABLE=1
go build -trimpath -ldflags="-s -w" ./cmd/go-portScan.go
10 changes: 10 additions & 0 deletions build/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
sed -i "s/deb.debian.org/repo.huaweicloud.com/g" /etc/apt/sources.list
sed -i "s/security.debian.org/repo.huaweicloud.com/g" /etc/apt/sources.list

apt update
apt install libpcap-dev gcc -y

export GOPROXY="https://goproxy.io,https://proxy.golang.org,direct"
export CGO_LDFLAGS="-Wl,-static -L/usr/lib/x86_64-linux-gnu/libpcap.a -lpcap -Wl,-Bdynamic `pkg-config --libs --cflags dbus-1`"
export GOENABLE=1
go build -trimpath -ldflags="-s -w" ./cmd/go-portScan.go

0 comments on commit 230ebc8

Please sign in to comment.