From: Yann Collet Date: Tue, 27 Aug 2019 23:01:39 +0000 (-0700) Subject: minor script renaming, for clarity X-Git-Tag: v1.4.4~1^2~66^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f61e8a231fb5a5f2872c70b2b0346b822673a88e;p=thirdparty%2Fzstd.git minor script renaming, for clarity --- diff --git a/contrib/single_file_decoder/README.md b/contrib/single_file_decoder/README.md index bf568be9c..159214e1b 100644 --- a/contrib/single_file_decoder/README.md +++ b/contrib/single_file_decoder/README.md @@ -7,7 +7,10 @@ Create `zstddeclib.c` from the Zstd source using: cd zstd/contrib/declib ./combine.sh -r ../../lib -r ../../lib/common -r ../../lib/decompress -o zstddeclib.c zstddeclib-in.c ``` -Then add the resulting file to your project (see the [example files](examples)). `build.sh` will run the above script then compile and test the library. +Then add the resulting file to your project (see the [example files](examples)). + +`create_single_file_decoder.sh` will run the above script, creating file `zstddeclib.c`. +`build_test.sh` will create the decoder, then compile and test the library. Why --- diff --git a/contrib/single_file_decoder/build.sh b/contrib/single_file_decoder/build_test.sh similarity index 85% rename from contrib/single_file_decoder/build.sh rename to contrib/single_file_decoder/build_test.sh index 9b85c551e..1b8e152da 100755 --- a/contrib/single_file_decoder/build.sh +++ b/contrib/single_file_decoder/build_test.sh @@ -10,13 +10,13 @@ OUT_FILE="tempbin" OUT_WASM="temp.wasm" # Amalgamate the sources -./combine.sh -r "$ZSTD_SRC_ROOT" -r "$ZSTD_SRC_ROOT/common" -r "$ZSTD_SRC_ROOT/decompress" -o zstddeclib.c zstddeclib-in.c +./create_single_file_decoder.sh # Did combining work? if [ $? -ne 0 ]; then - echo "Combine script: FAILED" + echo "Single file decoder creation script: FAILED" exit 1 fi -echo "Combine script: PASSED" +echo "Single file decoder creation script: PASSED" # Compile the generated output cc -Os -g0 -o $OUT_FILE examples/simple.c diff --git a/contrib/single_file_decoder/create_single_file_decoder.sh b/contrib/single_file_decoder/create_single_file_decoder.sh new file mode 100755 index 000000000..49f14cbd3 --- /dev/null +++ b/contrib/single_file_decoder/create_single_file_decoder.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Where to find the sources +ZSTD_SRC_ROOT="../../lib" + + +# Amalgamate the sources +./combine.sh -r "$ZSTD_SRC_ROOT" -r "$ZSTD_SRC_ROOT/common" -r "$ZSTD_SRC_ROOT/decompress" -o zstddeclib.c zstddeclib-in.c +# Did combining work? +if [ $? -ne 0 ]; then + echo "Combine script: FAILED" + exit 1 +fi +echo "Combine script: PASSED"