miniz/amalgamate.sh
ell1e b8f5bb23c6 Move verification out into separate script to fix ARM64 use
Some platforms don't have the clang sanitizer checks available
that are used in the verification tests, currently on these
the output files can't even be amalgamated. To fix this, separate
amalgamation and verification so that the later can be skipped.
2023-11-25 15:11:44 +01:00

38 lines
620 B
Bash
Executable File

#!/bin/bash
set -e
mkdir -p amalgamation
OUTPUT_PREFIX=_build/amalgamation
cmake -H. -B_build -DAMALGAMATE_SOURCES=ON -G"Unix Makefiles"
cp $OUTPUT_PREFIX/miniz.* amalgamation/
cp ChangeLog.md amalgamation/
cp LICENSE amalgamation/
cp readme.md amalgamation/
mkdir -p amalgamation/examples
cp examples/* amalgamation/examples/
cd amalgamation
! test -e miniz.zip || rm miniz.zip
cat << EOF | zip -@ miniz
miniz.c
miniz.h
ChangeLog.md
LICENSE
readme.md
examples/example1.c
examples/example2.c
examples/example3.c
examples/example4.c
examples/example5.c
examples/example6.c
EOF
cd ..
echo "Amalgamation created."