Skip to content

Commit

Permalink
Merge pull request #398 from krig/bnc854060
Browse files Browse the repository at this point in the history
Low: report: Add support for xz compressed logs
  • Loading branch information
beekhof committed Dec 9, 2013
2 parents 9663a1b + 414a2f4 commit ba8e3ea
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 ba8e3ea

Please sign in to comment.