summaryrefslogtreecommitdiff
path: root/poky/scripts/lz4c
blob: 466fc349e062dff06bd4b68f37b43fafab53f2df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env bash

# Wrapper to intercept legacy lz4c arguments and convert to lz4.
args=()
while [ $# -ne 0 ]; do
    case ${1} in
        -c0)
            args+=(-0)
            ;;
        -c1)
            args+=(-9)
            ;;
        -c2|-hc)
            args+=(-12)
            ;;
        -y)
            args+=(--force)
            ;;
        *)
            args+=("${1}")
            ;;
    esac
    shift
done

exec lz4 "${args[@]}"