From 8f042ae6b3b4f4e638177ddede9b0858a9890390 Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Tue, 9 Apr 2019 17:45:43 +0300 Subject: [PATCH] build-package.sh: do not try to gzip manpages that are already gzipped Avoid warning and broken symlinks. --- scripts/build/termux_step_massage.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/build/termux_step_massage.sh b/scripts/build/termux_step_massage.sh index 19e34cf60..e1e111c1b 100644 --- a/scripts/build/termux_step_massage.sh +++ b/scripts/build/termux_step_massage.sh @@ -58,7 +58,8 @@ termux_step_massage() { if [ -d share/man ]; then # Compress man pages with gzip: - find share/man -type f -print0 | xargs -r -0 gzip + find share/man -type f ! -iname \*.gz -print0 | xargs -r -0 gzip + # Update man page symlinks, e.g. unzstd.1 -> zstd.1: while IFS= read -r -d '' file do @@ -66,7 +67,7 @@ termux_step_massage() { _link_value=$(readlink $file) rm $file ln -s $_link_value.gz $file.gz - done < <(find share/man -type l -print0) + done < <(find share/man -type l ! -iname \*.gz -print0) fi termux_create_subpackages