]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
minor script renaming, for clarity
authorYann Collet <cyan@fb.com>
Tue, 27 Aug 2019 23:01:39 +0000 (16:01 -0700)
committerYann Collet <cyan@fb.com>
Tue, 27 Aug 2019 23:01:39 +0000 (16:01 -0700)
contrib/single_file_decoder/README.md
contrib/single_file_decoder/build_test.sh [moved from contrib/single_file_decoder/build.sh with 85% similarity]
contrib/single_file_decoder/create_single_file_decoder.sh [new file with mode: 0755]

index bf568be9cb1565ebb04910da1d184f4887a877e6..159214e1b5dbcb0423e8f77dca8cfd63e012d58b 100644 (file)
@@ -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
 ---
similarity index 85%
rename from contrib/single_file_decoder/build.sh
rename to contrib/single_file_decoder/build_test.sh
index 9b85c551e01272586cdc5433ecd6a5307cb9cb68..1b8e152dadca5aad519f49d088e2acba77d48ab5 100755 (executable)
@@ -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 (executable)
index 0000000..49f14cb
--- /dev/null
@@ -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"