libdeflate/scripts/make-windows-releases.sh
Eric Biggers 2c0223afc8 scripts: add .sh suffix to make-windows-releases
All the other shell scripts have it.
2020-10-18 15:14:15 -07:00

22 lines
602 B
Bash
Executable File

#!/bin/bash
set -eu
for arch in 'i686' 'x86_64'; do
make clean
make -j CC=${arch}-w64-mingw32-gcc CFLAGS="-Werror" all \
benchmark.exe checksum.exe
dir=libdeflate-$(git describe --tags | tr -d v)-windows-${arch}-bin
rm -rf $dir ${dir}.zip
mkdir $dir
cp libdeflate.{dll,lib,def} libdeflatestatic.lib libdeflate.h *.exe $dir
${arch}-w64-mingw32-strip ${dir}/libdeflate.dll ${dir}/*.exe
for file in COPYING NEWS; do
sed < $file > ${dir}/${file}.txt -e 's/$/\r/g'
done
for file in README.md; do
sed < $file > ${dir}/${file} -e 's/$/\r/g'
done
(cd ${dir} && zip -r ../${dir}.zip .)
done