Skip to content

Commit

Permalink
fix: disable CGO to build static binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
jm33-m0 committed Mar 20, 2022
1 parent 5a1dcd4 commit f12190f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions core/emp3r0r
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ case "$1" in
temp=/tmp/emp3r0r
[[ -d "$temp" ]] || mkdir -p "$temp"

export CGO_ENABLED=0

info "[-] Building binaries"
cd cmd/cc && go build -o "$temp/cc.exe"
cd "$pwd/cmd/cat" && go build -o "$temp/cat.exe"
Expand All @@ -43,11 +45,11 @@ case "$1" in
# tar
info "Preparing to archive files"
cd /tmp || error "Cannot cd to /tmp"
cp -avR "$pwd/tmux" "$temp"
cp -avR "$pwd/modules" "$temp"
cp -avR "$pwd/emp3r0r" "$temp"
cp -aR "$pwd/tmux" "$temp"
cp -aR "$pwd/modules" "$temp"
cp -aR "$pwd/emp3r0r" "$temp"
info "Tar XZ"
tar -cJvpf "$pwd/emp3r0r.tar.xz" ./emp3r0r
tar -cJpf "$pwd/emp3r0r.tar.xz" ./emp3r0r
success "Packaged emp3r0r"
exit 0

Expand Down

0 comments on commit f12190f

Please sign in to comment.