man.sh (222653) | man.sh (228992) |
---|---|
1#! /bin/sh 2# 3# Copyright (c) 2010 Gordon Tetlow 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 10 unchanged lines hidden (view full) --- 19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# | 1#! /bin/sh 2# 3# Copyright (c) 2010 Gordon Tetlow 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 10 unchanged lines hidden (view full) --- 19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# |
27# $FreeBSD: head/usr.bin/man/man.sh 222653 2011-06-03 14:34:38Z ru $ | 27# $FreeBSD: head/usr.bin/man/man.sh 228992 2011-12-30 11:02:40Z uqs $ |
28 29# Usage: add_to_manpath path 30# Adds a variable to manpath while ensuring we don't have duplicates. 31# Returns true if we were able to add something. False otherwise. 32add_to_manpath() { 33 case "$manpath" in 34 *:$1) decho " Skipping duplicate manpath entry $1" 2 ;; 35 $1:*) decho " Skipping duplicate manpath entry $1" 2 ;; --- 328 unchanged lines hidden (view full) --- 364 NROFF="$NROFF -rLL=${use_width}n -rLT=${use_width}n" 365 fi 366 367 if [ -n "$MANROFFSEQ" ]; then 368 set -- -$MANROFFSEQ 369 while getopts 'egprtv' preproc_arg; do 370 case "${preproc_arg}" in 371 e) pipeline="$pipeline | $EQN" ;; | 28 29# Usage: add_to_manpath path 30# Adds a variable to manpath while ensuring we don't have duplicates. 31# Returns true if we were able to add something. False otherwise. 32add_to_manpath() { 33 case "$manpath" in 34 *:$1) decho " Skipping duplicate manpath entry $1" 2 ;; 35 $1:*) decho " Skipping duplicate manpath entry $1" 2 ;; --- 328 unchanged lines hidden (view full) --- 364 NROFF="$NROFF -rLL=${use_width}n -rLT=${use_width}n" 365 fi 366 367 if [ -n "$MANROFFSEQ" ]; then 368 set -- -$MANROFFSEQ 369 while getopts 'egprtv' preproc_arg; do 370 case "${preproc_arg}" in 371 e) pipeline="$pipeline | $EQN" ;; |
372 g) ;; # Ignore for compatability. | 372 g) ;; # Ignore for compatibility. |
373 p) pipeline="$pipeline | $PIC" ;; 374 r) pipeline="$pipeline | $REFER" ;; 375 t) pipeline="$pipeline | $TBL" ;; 376 v) pipeline="$pipeline | $VGRIND" ;; 377 *) usage ;; 378 esac 379 done 380 # Strip the leading " | " from the resulting pipeline. --- 585 unchanged lines hidden --- | 373 p) pipeline="$pipeline | $PIC" ;; 374 r) pipeline="$pipeline | $REFER" ;; 375 t) pipeline="$pipeline | $TBL" ;; 376 v) pipeline="$pipeline | $VGRIND" ;; 377 *) usage ;; 378 esac 379 done 380 # Strip the leading " | " from the resulting pipeline. --- 585 unchanged lines hidden --- |