-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
test.sh
executable file
·52 lines (42 loc) · 996 Bytes
/
test.sh
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
42
43
44
45
46
47
48
49
50
51
#!/bin/sh
# this runs Sage on the generated .sage files to see if they work ok
typeset()
{
pdflatex -interaction=nonstopmode $1
if [ $? -ne 0 ]
then
echo "Error typesetting $1!"
exit 1
fi
}
checkdotsage()
{
sage $1.sagetex.sage
if [ $? -ne 0 ]
then
echo "Error running Sage on $1.sagetex.sage!"
exit 1
else
echo "No problem that spkg-check can detect running Sage on $1.sagetex.sage."
fi
}
pdflatex -version
if [ $? -ne 0 ]
then
echo "LaTeX (pdflatex) isn't installed (or isn't in \$PATH). Skipping test of SageTeX spkg."
exit 0
fi
cd src
# Make sure that we use the version of sagetex.py and example.tex in
# the current working directory.
unset TEXINPUTS
typeset example.tex
checkdotsage example
typeset example.tex
typeset example.tex
typeset sagetex.dtx
checkdotsage sagetex
typeset sagetex.dtx
typeset sagetex.dtx
# if we get here, we assume the .sage files are good, and exit successfully
exit 0