Viewing file: groffer (112.28 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/bin/sh
# groffer - display groff files
# Source file position: /contrib/groffer/groffer.sh
# Copyright (C) 2001,2002,2003,2004 Free Software Foundation, Inc.
# Written by Bernd Warken
# This file is part of groff version 1.18.1.1.
# groff is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# groff is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
# You should have received a copy of the GNU General Public License
# along with groff; see the files COPYING and LICENSE in the top
# directory of the groff source. If not, write to the Free Software
# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
_PROGRAM_NAME='groffer';
_PROGRAM_VERSION='0.9.11';
_LAST_UPDATE='15 June 2004';
########################################################################
# Determine the shell under which to run this script from the command
# line arguments or $GROFF_OPT; if none is specified, just go on with
# the starting shell.
if test _"${_groffer_run}"_ = __; then
# only reached during the first run of the script
export _groffer_run; # counter for the runs of groffer
_groffer_run='first';
export _PROGRAM_NAME;
export _PROGRAM_VERSION;
export _LAST_UPDATE;
export GROFFER_OPT; # option environment for groffer
export _GROFFER_SH; # file name of this shell script
export _OUTPUT_FILE_NAME; # output generated, see main_set_res..()
export _CONFFILES; # configuration files
_CONFFILES="/etc/groff/groffer.conf ${HOME}/.groff/groffer.conf";
case "$0" in
*${_PROGRAM_NAME}*)
_GROFFER_SH="$0";
# was: _GROFFER_SH="/usr/bin/${_PROGRAM_NAME}";
;;
*)
echo "The ${_PROGRAM_NAME} script should be started directly." >&2
exit 1;
;;
esac;
###########################
# _get_opt_shell ("$@")
#
# Determine whether `--shell' was specified in $GROFF_OPT or in $*;
# if so echo its argument.
#
_get_opt_shell()
{
local i;
local _sh;
case " ${GROFFER_OPT} $*" in
*\ --shell\ * bool(false)
|