summaryrefslogtreecommitdiff
path: root/support/kamal/texspell
blob: 13dca9721702e3e5c8e02c9b4b76aff5d5a4a588 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#! /bin/csh
# shell for running texspell which is TeX and LaTeX's spell
# Author: Kamal Al-Yahya 1984

set flag = ()
unset file

if ($#argv == 0) then
	echo "usage:  texspell [-w -i] file"
	exit(-1)
endif
while ($#argv > 0)
	switch ($argv[1])
		case -*:
			set flag = ($flag $argv[1])
			breaksw
		default:
			set file
			breaksw
		endsw
	if !($?file) then
		shift argv
	else
		break
	endif
end

if ($#argv == 0) then
	echo "usage:  texspell [-w -i] file"
	exit(-1)
endif
while ($#argv > 0)
		if -e $argv[1] then
			detex $flag $argv[1] | spell
		else
			echo "Can't open $argv[1]"
			exit(-1)
		endif
		shift argv
end
exit(0)