mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-28 12:14:22 +01:00
22 lines
577 B
Bash
Executable File
22 lines
577 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
platforms=("linux/amd64" "linux/arm" "linux/arm64" "linux/mips" "windows/amd64" "windows/386" "darwin/amd64")
|
|
|
|
for platform in "${platforms[@]}"
|
|
do
|
|
platform_split=(${platform//\// })
|
|
GOOS=${platform_split[0]}
|
|
GOARCH=${platform_split[1]}
|
|
output_name=gitleaks'-'$GOOS'-'$GOARCH
|
|
if [ $GOOS = "windows" ]; then
|
|
output_name+='.exe'
|
|
fi
|
|
|
|
env GOOS=$GOOS GOARCH=$GOARCH go build -o $output_name $package
|
|
if [ $? -ne 0 ]; then
|
|
echo 'An error has occurred! Aborting the script execution...'
|
|
exit 1
|
|
fi
|
|
done
|
|
|