SlunkCrypt/mk-release.sh

24 lines
637 B
Bash
Executable File

#!/bin/bash
set -e
cd -- "$(dirname -- "${BASH_SOURCE[0]}")"
mkdir -p "out"
$BASH -x -c "make clean"
case "$(getconf LONG_BIT)" in
"64")
$BASH -x -c "make -B CC=musl-gcc CPU=64 FLTO=1 STATIC=1 STRIP=1 MARCH=x86-64 MTUNE=nocona"
cp -vf "frontend/bin/slunkcrypt" "out/slunkcrypt-x64"
;;
"32")
$BASH -x -c "make -B CC=musl-gcc CPU=32 FLTO=1 STATIC=1 STRIP=1 MARCH=pentiumpro MTUNE=generic"
cp -vf "frontend/bin/slunkcrypt" "out/slunkcrypt-i686"
;;
*)
echo "Unknown platform!"
exit 1
;;
esac
printf "\033[1;32m\nBuild completed successfully.\033[0m\n\n"