]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
find_repeated_words.sh: Do not process files that are redirects
authorStéphane Aulery <saulery@free.fr>
Sun, 15 Mar 2015 00:15:24 +0000 (01:15 +0100)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Sun, 22 Mar 2015 18:25:22 +0000 (19:25 +0100)
Signed-off-by: Stéphane Aulery <saulery@free.fr>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
scripts/find_repeated_words.sh

index 50133be8a10bba70930253daf1d96d67ba0663e0..747872e3ba29b92b5dcf1cdd1e8160691c8f1ef6 100644 (file)
@@ -25,6 +25,9 @@
 #
 
 for file in "$@" ; do 
+   # Do not process files that are redirects.
+   grep -qE "^\.so man.*" "$file"
+   if test $? -ne 0; then
     words=$(MANWIDTH=2000 man -l "$file" 2> /dev/null | col -b | \
        tr ' \008' '\012' | sed -e '/^$/d' | \
        sed 's/ *$//' | 
@@ -33,4 +36,5 @@ for file in "$@" ; do
     if test -n "$words"; then
         echo "$file: $words"
     fi
+   fi
 done