| 1 | #! /bin/sh |
| 2 | |
| 3 | # ChkWEB v1.0, runs the LaTeX parts of a CWEB file through ChkTeX. |
| 4 | # Copyright (C) 1996 Jens T. Berger Thielemann |
| 5 | # |
| 6 | # This program is free software; you can redistribute it and/or modify |
| 7 | # it under the terms of the GNU General Public License as published by |
| 8 | # the Free Software Foundation; either version 2 of the License, or |
| 9 | # (at your option) any later version. |
| 10 | # |
| 11 | # This program is distributed in the hope that it will be useful, |
| 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | # GNU General Public License for more details. |
| 15 | # |
| 16 | # You should have received a copy of the GNU General Public License |
| 17 | # along with this program; if not, write to the Free Software |
| 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 19 | # |
| 20 | # Contact the author at: |
| 21 | # Jens Berger |
| 22 | # Spektrumvn. 4 |
| 23 | # N-0666 Oslo |
| 24 | # Norway |
| 25 | # E-mail: <[email protected]> |
| 26 | |
| 27 | |
| 28 | params= |
| 29 | |
| 30 | for p |
| 31 | do |
| 32 | case $p in |
| 33 | --) break |
| 34 | ;; |
| 35 | -*) params="$params $p" |
| 36 | shift |
| 37 | ;; |
| 38 | *) break |
| 39 | ;; |
| 40 | esac |
| 41 | done |
| 42 | |
| 43 | |
| 44 | if test "$1" = ""; then |
| 45 | deweb | chktex -v3 $params |
| 46 | else |
| 47 | for file |
| 48 | do |
| 49 | if test -f $file; then |
| 50 | deweb $file | chktex -p $file -v3 $params |
| 51 | else |
| 52 | deweb $file.w | chktex -p $file.w -v3 $params |
| 53 | fi |
| 54 | done |
| 55 | fi |
| 56 |