-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·34 lines (26 loc) · 803 Bytes
/
build.sh
File metadata and controls
executable file
·34 lines (26 loc) · 803 Bytes
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
#!/bin/bash
# Version
VERSION="1.0.0"
# Platforms to build for
PLATFORMS=(
"darwin/amd64" # Intel Mac
"darwin/arm64" # Apple Silicon Mac
"linux/amd64" # Intel/AMD Linux
"linux/arm64" # ARM Linux
"windows/amd64" # Intel/AMD Windows
"windows/arm64" # ARM Windows
)
# Build for each platform
for PLATFORM in "${PLATFORMS[@]}"; do
# Split platform into OS and ARCH
IFS="/" read -r OS ARCH <<< "$PLATFORM"
# Set filename based on OS
if [ "$OS" = "windows" ]; then
FILENAME="goExploitDB-${OS}-${ARCH}.exe"
else
FILENAME="goExploitDB-${OS}-${ARCH}"
fi
echo "Building for $OS/$ARCH..."
GOOS=$OS GOARCH=$ARCH go build -o "$FILENAME" main.go
done
echo "Build complete! Check the builds directory for the executables."