@@ -23,6 +23,7 @@ where option is one of the following:
23
23
-o/O select/unselect brotli
24
24
-y/Y select/unselect zstd
25
25
-b/B select/unselect bzip
26
+ -3/2 select/unselect bzip3
26
27
-g/G select/unselect gzip
27
28
-i/I select/unselect lz4
28
29
-7// select/unselect 7z
@@ -43,11 +44,12 @@ where option is one of the following:
43
44
-Q quick: Use gzip instead of zopfli (even if zopfli is available)"
44
45
exit ${1:- 1}
45
46
}
46
- unset zipd tgzd gzipbest brotlibest bzipbest za lz4best \
47
+ unset zipd tgzd gzipbest brotlibest bzipbest bzip3best za lz4best \
47
48
lzmabest xzbest zstdbest lrzip
48
49
tgzapp=' tgz'
49
50
tbrapp=' tbr'
50
51
tbzapp=' tbz'
52
+ tb3app=' tb3'
51
53
svzapp=' t7z'
52
54
tz4app=' tz4'
53
55
lzmapp=' tlz'
@@ -73,6 +75,7 @@ Selectall() {
73
75
withtgz=:
74
76
withtbr=:
75
77
withtbz=:
78
+ withtb3=:
76
79
withsvz=:
77
80
withtz4=:
78
81
withlzm=:
@@ -86,6 +89,7 @@ Selectnone() {
86
89
withtgz=false
87
90
withtbr=false
88
91
withtbz=false
92
+ withtb3=false
89
93
withsvz=false
90
94
withtz4=false
91
95
withlzm=false
@@ -113,7 +117,7 @@ case ${0##*/} in
113
117
esac
114
118
115
119
OPTIND=1
116
- while getopts ' vPqQXdcCSTsnaA7 /iIlLrYyWwRNtUzZoObBgGpFf0512486EhH' opt
120
+ while getopts ' vPqQXdcCSTsnaA327 /iIlLrYyWwRNtUzZoObBgGpFf0512486EhH' opt
117
121
do case $opt in
118
122
v) verbose=:;;
119
123
P) DeselectUnpopular;;
@@ -122,6 +126,7 @@ do case $opt in
122
126
X) tgzapp=' tar.gz'
123
127
tbrapp=' tar.br'
124
128
tbzapp=' tar.bz2'
129
+ tb3app=' tar.bz3'
125
130
svzapp=' tar.7z'
126
131
tz4app=' tar.lz4'
127
132
lzmapp=' tar.lzma'
@@ -144,6 +149,7 @@ do case $opt in
144
149
z) withzip=:;;
145
150
o) withtbr=:;;
146
151
b) withtbz=:;;
152
+ 3) withtb3=:;;
147
153
g) withtgz=:;;
148
154
7) withsvz=:;;
149
155
i) withtz4=:;;
@@ -156,6 +162,7 @@ do case $opt in
156
162
Z) withzip=false;;
157
163
O) withtbr=false;;
158
164
B) withtbz=false;;
165
+ 2) withtb3=false;;
159
166
G) withtgz=false;;
160
167
/) withsvz=false;;
161
168
I) withtz4=false;;
@@ -243,6 +250,7 @@ Dopack() {
243
250
tgznow=$withtgz
244
251
tbrnow=$withtbr
245
252
tbznow=$withtbz
253
+ tb3now=$withtb3
246
254
svznow=$withsvz
247
255
tz4now=$withtz4
248
256
lzmnow=$withlzm
@@ -254,15 +262,16 @@ Dopack() {
254
262
$tgznow && test -s " $destname .$tgzapp " && tgznow=false
255
263
$tbrnow && test -s " $destname .$tbrapp " && tbrnow=false
256
264
$tbznow && test -s " $destname .$tbzapp " && tbznow=false
265
+ $tb3now && test -s " $destname .$tb3app " && tb3now=false
257
266
$svznow && test -s " $destname .$svzapp " && svznow=false
258
267
$tz4now && test -s " $destname .$tz4app " && tz4now=false
259
268
$lzmnow && test -s " $destname .$lzmapp " && lzmnow=false
260
269
$txznow && test -s " $destname .$txzapp " && txznow=false
261
270
$tzsnow && test -s " $destname .$txzapp " && tzsnow=false
262
271
$lrznow && test -s " $destname .$lrzapp " && lrznow=false
263
272
fi
264
- if $tgznow || $tbrnow || $tbznow || $svznow || $tz4now || $lzmnow || \
265
- $txznow || $tzsnow || $lrznow
273
+ if $tgznow || $tbrnow || $tbznow || $tb3now || $svznow || $tz4now || \
274
+ $lzmnow || $txznow || $tzsnow || $lrznow
266
275
then tarnow=:
267
276
fi
268
277
$preserv && $tarnow && test -s " $destname .tar" && tarnow=false
@@ -304,6 +313,14 @@ Dopack() {
304
313
|| Errunp ' bzip2' " $nameb "
305
314
fi
306
315
Compare
316
+ nameb=$destname .$tb3app
317
+ if $tb3now
318
+ then EchoCond " Creating $nameb "
319
+ OptExternal bzip3best
320
+ " $bzip3best " -c -- " $destname .tar" > | " $nameb " \
321
+ || Errunp ' bzip3' " $nameb "
322
+ fi
323
+ Compare
307
324
nameb=$destname .$svzapp
308
325
if $svznow
309
326
then EchoCond " Creating $nameb "
0 commit comments