From 4fcf50ddc5ec796008d873060b6b6c9d6c407692 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 18 Sep 2023 12:36:13 +0000 Subject: [PATCH] compress-man-pages: Support already XZ compressed man pages Signed-off-by: Michael Tremer --- src/scripts/compress-man-pages | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/scripts/compress-man-pages b/src/scripts/compress-man-pages index 0ff079066..6a4560123 100644 --- a/src/scripts/compress-man-pages +++ b/src/scripts/compress-man-pages @@ -63,6 +63,11 @@ main() { file="${file%*.gz}" fi ;; + *.xz) + if xz -d "${file}"; then + file="${file%*.xz}" + fi + ;; esac # Say what we are doing... @@ -98,14 +103,14 @@ main() { # Strip any previous compression from link case "${link}" in - *.bz2|*.gz) + *.bz2|*.gz|*.xz) link="${link%.*}" ;; esac # Strip any previous compression from target case "${target}" in - *.bz2|*.gz) + *.bz2|*.gz|*.xz) target="${target%.*}" ;; esac -- 2.47.2