summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2022-03-17 18:55:32 +0000
committerColin Watson <cjwatson@debian.org>2022-03-17 18:55:32 +0000
commit8a20bb7f39d2e3d90f2368a2a6b2a1ff8bc5968d (patch)
treee831769a198aa73f254242f0f75139640228cae8 /tools
parent8729cc9a129888d81024f59510ac45a464a032c5 (diff)
parent968e4c27cfa5e48997eb69dfe0060bf8b2f295f4 (diff)
Import man-db_2.10.2.orig.tar.xz
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile.in6
-rwxr-xr-xtools/checkman14
-rwxr-xr-xtools/mkcatdirs32
3 files changed, 25 insertions, 27 deletions
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 3d3023fd..afd8be30 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -103,6 +103,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/man-arg-automatic-create.m4 \
$(top_srcdir)/m4/man-arg-override-dir.m4 \
$(top_srcdir)/m4/man-arg-sections.m4 \
$(top_srcdir)/m4/man-arg-setuid.m4 \
+ $(top_srcdir)/m4/man-arg-snapdir.m4 \
$(top_srcdir)/m4/man-arg-systemdsystemunitdir.m4 \
$(top_srcdir)/m4/man-arg-systemdtmpfilesdir.m4 \
$(top_srcdir)/m4/man-arg-undoc.m4 $(top_srcdir)/m4/man-bdb.m4 \
@@ -207,8 +208,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/man-arg-automatic-create.m4 \
$(top_srcdir)/gl/m4/openat.m4 $(top_srcdir)/gl/m4/opendir.m4 \
$(top_srcdir)/gl/m4/pathmax.m4 $(top_srcdir)/gl/m4/pipe.m4 \
$(top_srcdir)/gl/m4/po.m4 $(top_srcdir)/gl/m4/printf.m4 \
- $(top_srcdir)/gl/m4/progtest.m4 \
+ $(top_srcdir)/gl/m4/progtest.m4 $(top_srcdir)/gl/m4/pselect.m4 \
$(top_srcdir)/gl/m4/pthread_rwlock_rdlock.m4 \
+ $(top_srcdir)/gl/m4/pthread_sigmask.m4 \
$(top_srcdir)/gl/m4/raise.m4 $(top_srcdir)/gl/m4/rawmemchr.m4 \
$(top_srcdir)/gl/m4/readdir.m4 $(top_srcdir)/gl/m4/readlink.m4 \
$(top_srcdir)/gl/m4/realloc.m4 \
@@ -1063,6 +1065,7 @@ LIB_HARD_LOCALE = @LIB_HARD_LOCALE@
LIB_MBRTOWC = @LIB_MBRTOWC@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
LIB_NL_LANGINFO = @LIB_NL_LANGINFO@
+LIB_PTHREAD_SIGMASK = @LIB_PTHREAD_SIGMASK@
LIB_SCHED_YIELD = @LIB_SCHED_YIELD@
LIB_SELECT = @LIB_SELECT@
LIB_SETLOCALE_NULL = @LIB_SETLOCALE_NULL@
@@ -1526,6 +1529,7 @@ runstatedir = @runstatedir@
sbindir = @sbindir@
sections = @sections@
sharedstatedir = @sharedstatedir@
+snapdir = @snapdir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
systemdsystemunitdir = @systemdsystemunitdir@
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
diff --git a/tools/mkcatdirs b/tools/mkcatdirs
index b8e3cc09..d470d36f 100755
--- a/tools/mkcatdirs
+++ b/tools/mkcatdirs
@@ -22,8 +22,7 @@
#PATH=.:/usr/local/bin:/usr/bin:/bin
-progname=`basename $0`
-here=`pwd`
+progname=$(basename "$0")
test_only=
# sort out the command line options
@@ -41,7 +40,7 @@ else
fi
fi
-( test "$1" = "-h" || test "$1" = "--help" ) && help=yes || help=
+{ test "$1" = "-h" || test "$1" = "--help"; } && help=yes || help=
if test "$help" || test -z "$test_only"
then
@@ -62,17 +61,17 @@ EOF
exit 0
fi
-for manpath in `manpath -qg | tr ':' ' '`
+for manpath in $(manpath -qg | tr ':' ' ')
do
+ [ -d "$manpath" ] || continue
echo "Manual page hierarchy: $manpath"
- catdir=`MANPATH=$manpath manpath -qc 2>/dev/null`
- cd $manpath
+ catdir=$(MANPATH=$manpath manpath -qc 2>/dev/null)
subdirs=
- for subdir in `echo man?*`
+ for subdir in $(cd "$manpath" && echo man?*)
do
- test -d "$subdir" &&
- subdirs="$subdirs `echo ${subdir} | sed -e 's,man,cat,'`"
+ test -d "$manpath/$subdir" &&
+ subdirs="$subdirs $(echo "$subdir" | sed -e 's,man,cat,')"
done
echo "Cat page hierarchy: $catdir"
@@ -84,8 +83,7 @@ do
subs_ok=
for subdir in $subdirs
do
- cd $catdir
- test -d "$subdir" &&
+ test -d "$catdir/$subdir" &&
subs_ok="$subs_ok $subdir" ||
subs_needed="$subs_needed $subdir"
done
@@ -103,18 +101,12 @@ do
catdirs=
fi
- cd $here
if test "$test_only" = "no" && test "$catdirs"
then
echo " "
- echo "mkinstalldirs $catdirs" &&
- mkinstalldirs $catdirs &&
- echo "chown $owner $catdirs" &&
- chown $owner $catdirs &&
- echo "chgrp $group $catdirs" &&
- chgrp $group $catdirs &&
- echo "chmod $mode $catdirs" &&
- chmod $mode $catdirs ||
+ # shellcheck disable=SC2086
+ echo "install -d -o $owner -g $group -m $mode $catdirs" &&
+ install -d -o "$owner" -g "$group" -m "$mode" $catdirs ||
exit $?
fi