2020-04-03 19:07:46 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Where to find the sources
|
|
|
|
ZSTD_SRC_ROOT="../../lib"
|
|
|
|
|
|
|
|
# Amalgamate the sources
|
2022-01-19 11:32:53 +01:00
|
|
|
echo "Amalgamating files..."
|
2022-01-17 18:59:54 +01:00
|
|
|
# Using the faster Python script if we have 3.8 or higher
|
|
|
|
if python3 -c 'import sys; assert sys.version_info >= (3,8)' 2>/dev/null; then
|
2022-01-19 11:32:53 +01:00
|
|
|
./combine.py -r "$ZSTD_SRC_ROOT" -x legacy/zstd_legacy.h -o zstd.c zstd-in.c
|
2022-01-17 18:59:54 +01:00
|
|
|
else
|
2022-01-19 11:32:53 +01:00
|
|
|
./combine.sh -r "$ZSTD_SRC_ROOT" -x legacy/zstd_legacy.h -o zstd.c zstd-in.c
|
2022-01-17 18:59:54 +01:00
|
|
|
fi
|
2020-04-03 19:07:46 +02:00
|
|
|
# Did combining work?
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
echo "Combine script: FAILED"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
echo "Combine script: PASSED"
|