diff options
Diffstat (limited to 'scripts/lz4c')
| -rwxr-xr-x | scripts/lz4c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/lz4c b/scripts/lz4c new file mode 100755 index 0000000000..466fc349e0 --- /dev/null +++ b/scripts/lz4c | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | #!/usr/bin/env bash | ||
| 2 | |||
| 3 | # Wrapper to intercept legacy lz4c arguments and convert to lz4. | ||
| 4 | args=() | ||
| 5 | while [ $# -ne 0 ]; do | ||
| 6 | case ${1} in | ||
| 7 | -c0) | ||
| 8 | args+=(-0) | ||
| 9 | ;; | ||
| 10 | -c1) | ||
| 11 | args+=(-9) | ||
| 12 | ;; | ||
| 13 | -c2|-hc) | ||
| 14 | args+=(-12) | ||
| 15 | ;; | ||
| 16 | -y) | ||
| 17 | args+=(--force) | ||
| 18 | ;; | ||
| 19 | *) | ||
| 20 | args+=("${1}") | ||
| 21 | ;; | ||
| 22 | esac | ||
| 23 | shift | ||
| 24 | done | ||
| 25 | |||
| 26 | exec lz4 "${args[@]}" | ||
