#!/bin/bash SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) OUTPUTFILE="dist/canihazip" mkdir -p "$SCRIPT_DIR/dist" rm "$SCRIPT_DIR"/dist/canihazip &> /dev/null go mod tidy go build -v -trimpath -ldflags "-s -w" -o "$OUTPUTFILE" if [ $? -eq 0 ]; then chmod +x "$OUTPUTFILE" echo "Build Succeeded -> $OUTPUTFILE" fi