]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
src/bin/diffman, man/man1/diffman: Remove program
authorAlejandro Colomar <alx@kernel.org>
Thu, 9 Jan 2025 14:23:27 +0000 (15:23 +0100)
committerAlejandro Colomar <alx@kernel.org>
Sat, 11 Jan 2025 19:01:34 +0000 (20:01 +0100)
It was useful for implementing duffman(1), but now it doesn't use it
anymore.  Drop this program.

Users can do this instead:

$ MAN_KEEP_FORMATTING=1 diff -u <(man page1) <(man page2);

Signed-off-by: Alejandro Colomar <alx@kernel.org>
man/man1/diffman.1 [deleted file]
src/bin/diffman [deleted file]

diff --git a/man/man1/diffman.1 b/man/man1/diffman.1
deleted file mode 100644 (file)
index b93916e..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-.\" Copyright 2024, Alejandro Colomar <alx@kernel.org>
-.\"
-.\" SPDX-License-Identifier: Linux-man-pages-copyleft
-.\"
-.TH diffman 1 (date) "Linux man-pages (unreleased)"
-.SH NAME
-diffman
-\-
-compare formatted manual pages line by line
-.SH SYNOPSIS
-.SY diffman
-.RI [ diff-options \~.\|.\|.\&]
-.I page1
-.I page2
-.YS
-.SH DESCRIPTION
-The
-.B diffman
-command
-formats two manual pages,
-and then runs
-.BR diff (1)
-on the formatted outputs.
-.P
-The pages are specified with the same syntax that
-.BR man (1)
-accepts.
-.P
-The output is suitable for piping to
-.IR less\~\-R .
-.SH OPTIONS
-.TP
-.B \-s
-Report when two files are the same.
-.TP
-.BI \-U n
-output
-.I n
-(default 3)
-lines of unified context.
-.TP
-.B \-w
-Ignore all white space.
-.SH ENVIRONMENT
-See
-.BR man (1).
-.SH EXAMPLES
-.EX
-.RB $\~ "diffman membarrier man2/membarrier.2 | less \-R" ;
-$
-.EE
-.SH SEE ALSO
-.BR diff (1),
-.BR man (1),
-.BR less (1)
diff --git a/src/bin/diffman b/src/bin/diffman
deleted file mode 100755 (executable)
index b57841b..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2024, Alejandro Colomar <alx@kernel.org>
-# SPDX-License-Identifier: GPL-3.0-or-later
-
-set -Eeuo pipefail;
-shopt -s lastpipe;
-
-
-# Defaults:
-s='';
-u='-u';
-w='';
-
-
-err()
-{
-       >&2 echo "$(basename "$0"): error: $*";
-       exit 1;
-}
-
-
-while getopts "sU:w" opt; do
-       case "$opt" in
-       s)      s='-s';         ;;
-       U)      u="-U$OPTARG";  ;;
-       w)      w='-w';         ;;
-       \?)     exit 1;         ;;
-       *)      exit 1;         ;;
-       esac;
-done;
-shift $((OPTIND-1));
-
-
-if test $# -ne 2; then
-       err "Expected two arguments.";
-fi;
-
-mktemp -t "a.XXXXXX" \
-| read -r t1;
-mktemp -t "b.XXXXXX" \
-| read -r t2;
-
-test -v MAN_KEEP_FORMATTING \
-|| export MAN_KEEP_FORMATTING=1;
-
-man "$1" >"$t1";
-man "$2" >"$t2";
-
-
-# shellcheck disable=SC2206  # We want only non-empty variables in the array.
-opts=($s $w $u);
-
-
-diff --label "$1" --label "$2" "${opts[@]}" "$t1" "$t2";