diff options
author | Norbert Preining <norbert@preining.info> | 2019-11-03 03:01:01 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-11-03 03:01:01 +0000 |
commit | aa26106a9b77529d1eae806729d8076378ced64b (patch) | |
tree | c1a96609e17d84e6fc764caf3a52c65e7ed8c5eb /support/chklref/src/chklref.in | |
parent | 3479a92321ed7fe7e2133d3daec2d4f5fd53fbc6 (diff) |
CTAN sync 201911030301
Diffstat (limited to 'support/chklref/src/chklref.in')
-rw-r--r-- | support/chklref/src/chklref.in | 126 |
1 files changed, 0 insertions, 126 deletions
diff --git a/support/chklref/src/chklref.in b/support/chklref/src/chklref.in deleted file mode 100644 index dee79c9ac7..0000000000 --- a/support/chklref/src/chklref.in +++ /dev/null @@ -1,126 +0,0 @@ -#!/usr/bin/env sh - -## -## wrapper for chklref program -## Automatically generated by configure from chklref.in -## - -######################################################################### -# Written and (C) by Jérôme Lelong <jerome.lelong@gmail.com> # -# # -# This program 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 3 of the License, or # -# (at your option) any later version. # -# # -# This program 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 this program. If not, see <http://www.gnu.org/licenses/>. # -######################################################################### - -prefix=@prefix@ -bindir=@bindir@ -SCRIPTSDIR=@SCRIPTSDIR@ - -PERL=@PERL_PATH@ -LATEX=@LATEX_PATH@ -PDFLATEX=@PDFLATEX_PATH@ -VERSION=@VERSION@ -LATEXDIR=@LATEXDIR@ -DOCDIR=@DOCDIR@ -SCRIPTSDIR=@SCRIPTSDIR@ - -print_usage() -{ - cat << EOF - -chklref - -This is a latex utility to check for unused labels and bibitems in -a LaTeX file. - -usage: chklref [OPTIONS] file[.tex] - -OPTIONS - - -p,--pdf : Use pdflatex instead of latex - -q,--quiet : Run LaTeX quietly - -d,--debug : Run in deubgging mode - -h,--help : Display this help - --version : Display the version number - -EOF -} - -out='/dev/stdout' -latex_cmd=$LATEX -debug=0 -while test -n "$1" -do - case "$1" in - -p|--pdf) - latex_cmd=$PDFLATEX - shift - ;; - -h|--help) - print_usage - exit 0 - ;; - -q|--quiet) - out='/dev/null' - shift - ;; - -d|--debug) - debug=1 - shift - ;; - --version) - echo "chklref version $VERSION" - exit 0 - ;; - -*) - echo "Unknown option: $1" - print_usage - exit 1 - ;; - *) - break - ;; - esac -done - -INFILE=$1 -if test -z "$INFILE"; then - echo "$0: You must specify an input file" - exit 1 -fi - -if test ! -f "${INFILE}"; then - INFILE=${INFILE}.tex -fi -if test ! -f "${INFILE}"; then - echo "$0: Neither ${INFILE} nor ${INFILE}.tex exists" - exit 1 -fi - -# POSIX extractions of dirname and basename -basetexfile=${INFILE##*/} -basetexfile=${basetexfile%.tex} -dirtexfile=${INFILE%/*} -if [ "${dirtexfile}" = "$1" ]; then dirtexfile="."; fi - -cd -- "${dirtexfile}" - -echo "Running $latex_cmd on $basetexfile.tex to collect labels, -references and environment declarations\n\n" > "$out" -$latex_cmd --interaction errorstopmode "${basetexfile}" > "$out" 2>&1 -rm -f -- "$basetexfile".tex.chk -$latex_cmd --interaction errorstopmode --jobname "$basetexfile" \ - '\RequirePackage{chklref}\input' "{$basetexfile.tex}" > "$out" 2>&1 -$PERL "$SCRIPTSDIR"/chkparser "$basetexfile".chk -[ $debug -ne 0 ] || rm -f -- "$basetexfile".chk - |