We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b1f1a8 commit 1f6a656Copy full SHA for 1f6a656
tools/bug-report
@@ -109,9 +109,24 @@ copy \
109
progress "done"
110
echo
111
112
-outfile="$PWD/make-initrd-bugreport-$(date +"%Y%m%d").tar.bz2"
+compress="cat"
113
+compargs=()
114
+suffix=
115
+
116
+if compress="$(type -P xz)"; then
117
+ compargs=("-9")
118
+ suffix=".xz"
119
+elif compress="$(type -P bzip2)"; then
120
121
+ suffix=".bz2"
122
+elif compress="$(type -P gzip)"; then
123
124
+ suffix=".gz"
125
+fi
126
127
+outfile="$PWD/make-initrd-bugreport-$(date +"%Y%m%d").tar$suffix"
128
129
cd "$workdir"
-tar -cjf "$outfile" report
130
+tar -cf - report | "$compress" "${compargs[@]}" >"$outfile"
131
132
printf '\nPlease submit %s to authors\n\n' "$outfile"
0 commit comments