diff options
Diffstat (limited to 'lsinitcpio')
-rwxr-xr-x | lsinitcpio | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -69,7 +69,7 @@ size_to_human() { } detect_filetype() { - case $(hexdump -n 6 -e '"%c"' "$1") in + case $(hexdump -n 6 -e '"%c"' "$1") in '070701') # no compression return @@ -90,6 +90,11 @@ detect_filetype() { return fi + if [[ $(hexdump -n 4 -e '"%x"' "$1") == '184d2204' ]]; then + echo 'lz4' + return + fi + if [[ $(hexdump -n 3 -e '"%c"' "$1") == 'BZh' ]]; then echo 'bzip2' return |