[cli-tests] Fix zstd symlinks
The zstd symlinks, notably `zstdcat`, weren't working as expected because only the `tests/cli-tests/bin/zstd` wrapper was symlinked. We still invoked `zstd` with the name `zstd`. The fix is to create a directory of zstd symlinks in `tests/cli-tests/bin/symlinks` for each name that zstd recognizes. And when `tets/cli-tests/bin/zstd` is invoked, it selects the correct symlink to call. See the test `zstd-cli/zstdcat.sh` for an example of how it would work.
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
zstdname=$(basename $0)
|
||||
|
||||
if [ -z "$EXEC_PREFIX" ]; then
|
||||
"$ZSTD_BIN" $@
|
||||
"$ZSTD_SYMLINK_DIR/$zstdname" $@
|
||||
else
|
||||
$EXEC_PREFIX "$ZSTD_BIN" $@
|
||||
$EXEC_PREFIX "$ZSTD_SYMLINK_DIR/$zstdname" $@
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user