From: Alejandro Colomar Date: Thu, 9 Jan 2025 14:23:27 +0000 (+0100) Subject: src/bin/diffman, man/man1/diffman: Remove program X-Git-Tag: man-pages-6.10~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bda01d843d113088c33a60b7f9e103b2a24b1a5;p=thirdparty%2Fman-pages.git src/bin/diffman, man/man1/diffman: Remove program 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 --- diff --git a/man/man1/diffman.1 b/man/man1/diffman.1 deleted file mode 100644 index b93916e37..000000000 --- a/man/man1/diffman.1 +++ /dev/null @@ -1,55 +0,0 @@ -.\" Copyright 2024, Alejandro Colomar -.\" -.\" 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 index b57841b36..000000000 --- a/src/bin/diffman +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash -# -# Copyright 2024, Alejandro Colomar -# 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";