Skip to content

Commit

Permalink
Low: report: Add support for xz compressed logs
Browse files Browse the repository at this point in the history
Add support for reading and creating xz-compressed
log files.

Bugid: bnc#854060
  • Loading branch information
krig committed Dec 8, 2013
1 parent 9663a1b commit 414a2f4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tools/report.common.in
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ shrink() {
target=$1.tar
tar_options="cf"

variant=`pickfirst bzip2 gzip false`
variant=`pickfirst bzip2 gzip xz false`
case $variant in
bz*)
tar_options="jcf"
Expand All @@ -381,6 +381,10 @@ shrink() {
tar_options="zcf"
target="$target.gz"
;;
xz*)
tar_options="Jcf"
target="$target.xz"
;;
*)
warning "Could not find a compression program, the resulting tarball may be huge"
;;
Expand Down Expand Up @@ -456,6 +460,8 @@ find_decompressor() {
echo "bzip2 -dc"
elif echo $1 | grep -qs 'gz$'; then
echo "gzip -dc"
elif echo $1 | grep -qs 'xz$'; then
echo "xz -dc"
else
echo "cat"
fi
Expand Down

0 comments on commit 414a2f4

Please sign in to comment.