diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dbc8ace..64de82c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,7 @@ jobs: if: matrix.container == 'ubuntu:latest' run: | apt update - apt -y install git make pbzip2 binutils bzip2 zstd gnupg openssl + apt -y install git make pbzip2 binutils bzip2 zstd gnupg openssl zopfli - name: Install RockyLinux packages if: matrix.container == 'rockylinux:9' @@ -42,7 +42,7 @@ jobs: - name: Install Alpine packages if: matrix.container == 'alpine:latest' - run: apk add --no-cache bash git make libarchive-tools gnupg coreutils binutils bzip2 zstd openssl + run: apk add --no-cache bash git make libarchive-tools gnupg coreutils binutils bzip2 zstd openssl zopfli - name: Install macOS packages if: runner.os == 'macOS' diff --git a/makeself.1 b/makeself.1 index fa21216..d8f3dd4 100644 --- a/makeself.1 +++ b/makeself.1 @@ -50,6 +50,9 @@ Compress using lz4. .B --pigz Compress using pigz. .TP +.B --zopfli +Compress using zopfli. +.TP .B --zstd Compress using zstd. .TP diff --git a/makeself.sh b/makeself.sh index 776ebd3..3e68ee1 100755 --- a/makeself.sh +++ b/makeself.sh @@ -62,6 +62,7 @@ MS_Usage() echo " --quiet | -q : Do not print any messages other than errors." echo " --gzip : Compress using gzip (default if detected)" echo " --pigz : Compress with pigz" + echo " --zopfli : Compress with zopfli" echo " --zstd : Compress with zstd" echo " --bzip2 : Compress using bzip2 instead of gzip" echo " --pbzip2 : Compress using pbzip2 instead of gzip" @@ -217,6 +218,10 @@ do COMPRESS=pigz shift ;; + --zopfli) + COMPRESS=zopfli + shift + ;; --zstd) COMPRESS=zstd shift @@ -512,6 +517,10 @@ pigz) fi GUNZIP_CMD="gzip -cd" ;; +zopfli) + GZIP_CMD="zopfli -c" + GUNZIP_CMD="gzip -cd" + ;; zstd) GZIP_CMD="zstd -$COMPRESS_LEVEL" if test $THREADS -ne $DEFAULT_THREADS; then # Leave as the default if threads not indicated diff --git a/test/extracttest b/test/extracttest index 5fb7b5c..0bdfb8b 100644 --- a/test/extracttest +++ b/test/extracttest @@ -58,6 +58,16 @@ testZstd() assertEquals $? 0 } +testZopfli() +{ + # Skip if zopfli is not available + command -v zopfli >/dev/null 2>&1 || startSkipping + setupTests --zopfli + + ./makeself-test.run --check + assertEquals $? 0 +} + # Load and run shUnit2. source "./shunit2/shunit2"