git subrepo pull (merge) --force deps/libchdr
[pcsx_rearmed.git] / deps / libchdr / deps / zstd-1.5.5 / build / single_file_libs / create_single_file_decoder.sh
1 #!/bin/sh
2
3 # Where to find the sources
4 ZSTD_SRC_ROOT="../../lib"
5
6 # Amalgamate the sources
7 echo "Amalgamating files..."
8 # Using the faster Python script if we have 3.8 or higher
9 if python3 -c 'import sys; assert sys.version_info >= (3,8)' 2>/dev/null; then
10   ./combine.py -r "$ZSTD_SRC_ROOT" -x legacy/zstd_legacy.h -o zstddeclib.c zstddeclib-in.c
11 else
12   ./combine.sh -r "$ZSTD_SRC_ROOT" -x legacy/zstd_legacy.h -o zstddeclib.c zstddeclib-in.c
13 fi
14 # Did combining work?
15 if [ $? -ne 0 ]; then
16   echo "Combine script: FAILED"
17   exit 1
18 fi
19 echo "Combine script: PASSED"