From 6e115274b615e698a8673ffded63895cf5089b41 Mon Sep 17 00:00:00 2001 From: Geoff Davis Date: Mon, 2 Nov 2009 12:26:20 -0800 Subject: [PATCH 1/1] Fix help page display on Solaris and OS X mr assumed that we were using Linux/GNU man. Added logic to detect SunOS and Darwin, and call man with the appropriate arguments --- mr | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/mr b/mr index eb766d4..0a78df5 100755 --- a/mr +++ b/mr @@ -1629,14 +1629,26 @@ hg_trusted_checkout = hg clone $url $repo darcs_trusted_checkout = darcs get $url $repo git_bare_trusted_checkout = git clone --bare $url $repo + help = + case `uname -s` in + SunOS) + SHOWMANFILE="/usr/bin/man -f" + ;; + Darwin) + SHOWMANFILE="/usr/bin/man" + ;; + *) + SHOWMANFILE="/usr/bin/man -l" + ;; + esac if [ ! -e "$MR_PATH" ]; then error "cannot find program path" fi tmp=$(mktemp -t mr.XXXXXXXXXX) || error "mktemp failed" trap "rm -f $tmp" exit pod2man -c mr "$MR_PATH" > "$tmp" || error "pod2man failed" - man -l "$tmp" || error "man failed" + $SHOWMANFILE "$tmp" || error "man failed" list = true config = bootstrap = -- 2.39.5