diff options
author | Colin Watson <cjwatson@debian.org> | 2022-03-17 18:55:32 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2022-03-17 18:55:32 +0000 |
commit | 8a20bb7f39d2e3d90f2368a2a6b2a1ff8bc5968d (patch) | |
tree | e831769a198aa73f254242f0f75139640228cae8 /tools/checkman | |
parent | 8729cc9a129888d81024f59510ac45a464a032c5 (diff) | |
parent | 968e4c27cfa5e48997eb69dfe0060bf8b2f295f4 (diff) |
Import man-db_2.10.2.orig.tar.xz
Diffstat (limited to 'tools/checkman')
-rwxr-xr-x | tools/checkman | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/checkman b/tools/checkman index 4174473f..f93998d1 100755 --- a/tools/checkman +++ b/tools/checkman @@ -29,21 +29,22 @@ if test $# -ne 0 then manpath=$1 else - manpath=`manpath -q` + manpath=$(manpath -q) fi echo "Search for duplicates under:" >&2 -echo $manpath >&2 +echo "$manpath" >&2 -dups=`whatis -w -M $manpath "*" | sed -e 's/\([^(]*\) (\([^)]*\)).*/\2#\1/' | \ - sort | uniq -d` +dups=$(whatis -w -M "$manpath" "*" | + sed -e 's/\([^(]*\) (\([^)]*\)).*/\2#\1/' | \ + sort | uniq -d) for i in $dups do # split up the dup into the section/name components - args=`echo $i |tr '#' ' '` + args=$(echo "$i" | tr '#' ' ') # We only cater for two dups. Others will have to be fixed on a later run. # Find the locations of the dup'd files @@ -51,7 +52,8 @@ do file1= file2= - for file in `man -aw -M $manpath $args |sed -e 's/\([^ ]*\).*/\1/'` + # shellcheck disable=SC2086 + for file in $(man -aw -M "$manpath" $args |sed -e 's/\([^ ]*\).*/\1/') do if test "$file1" then |