File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,11 +12,11 @@ jobs:
1212 steps :
1313 - name : Install Linux packages
1414 if : runner.os == 'Linux'
15- run : sudo env DEBIAN_FRONTEND=noninteractive apt-get -qq -y install pbzip2
15+ run : sudo env DEBIAN_FRONTEND=noninteractive apt-get -qq -y install pbzip2 zstd
1616
1717 - name : Install macOS packages
1818 if : runner.os == 'macOS'
19- run : brew install pbzip2 coreutils
19+ run : brew install pbzip2 coreutils zstd
2020
2121 - name : Checkout Makeself
2222 uses : actions/checkout@v2
Original file line number Diff line number Diff line change @@ -105,13 +105,14 @@ MS_Usage()
105105 echo " --quiet | -q : Do not print any messages other than errors."
106106 echo " --gzip : Compress using gzip (default if detected)"
107107 echo " --pigz : Compress with pigz"
108+ echo " --zstd : Compress with zstd"
108109 echo " --bzip2 : Compress using bzip2 instead of gzip"
109110 echo " --pbzip2 : Compress using pbzip2 instead of gzip"
110111 echo " --xz : Compress using xz instead of gzip"
111112 echo " --lzo : Compress using lzop instead of gzip"
112113 echo " --lz4 : Compress using lz4 instead of gzip"
113114 echo " --compress : Compress using the UNIX 'compress' command"
114- echo " --complevel lvl : Compression level for gzip pigz xz lzo lz4 bzip2 and pbzip2 (default 9)"
115+ echo " --complevel lvl : Compression level for gzip pigz zstd xz lzo lz4 bzip2 and pbzip2 (default 9)"
115116 echo " --threads thds : Number of threads to be used by compressors that support parallelization."
116117 echo " Omit to use compressor's default. Most useful (and required) for opting"
117118 echo " into xz's threading, usually with '--threads=0' for all available cores."
233234 COMPRESS=pigz
234235 shift
235236 ;;
237+ --zstd)
238+ COMPRESS=zstd
239+ shift
240+ ;;
236241 --xz)
237242 COMPRESS=xz
238243 shift
@@ -500,6 +505,10 @@ pigz)
500505 fi
501506 GUNZIP_CMD=" gzip -cd"
502507 ;;
508+ zstd)
509+ GZIP_CMD=" zstd -$COMPRESS_LEVEL "
510+ GUNZIP_CMD=" zstd -cd"
511+ ;;
503512pbzip2)
504513 GZIP_CMD=" pbzip2 -c$COMPRESS_LEVEL "
505514 if test $THREADS -ne $DEFAULT_THREADS ; then # Leave as the default if threads not indicated
Original file line number Diff line number Diff line change @@ -46,6 +46,15 @@ testPBzip2()
4646 assertEqual $? 0
4747}
4848
49+ testZstd ()
50+ {
51+ # Skip if zstd is not available
52+ which zstd || return
53+ setupTests --zstd
54+
55+ ./makeself-test.run --check
56+ assertEqual $? 0
57+ }
4958
5059source bashunit/bashunit.bash
5160
You can’t perform that action at this time.
0 commit comments