mirror of
https://github.com/facebook/zstd.git
synced 2024-11-27 17:36:44 +08:00
minor script renaming, for clarity
This commit is contained in:
parent
517aeb89dc
commit
f61e8a231f
@ -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
|
||||
---
|
||||
|
@ -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
|
14
contrib/single_file_decoder/create_single_file_decoder.sh
Executable file
14
contrib/single_file_decoder/create_single_file_decoder.sh
Executable file
@ -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"
|
Loading…
Reference in New Issue
Block a user