2000-07-12 13:24:24 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Attempt to build listerrors (see examples/Literate.lyx) at build-time
|
|
|
|
#
|
|
|
|
# Author: Kayvan Sylvan <kayvan@sylvan.com>
|
2000-10-02 04:21:44 +00:00
|
|
|
#
|
|
|
|
# Assume notangle is on the path
|
2000-07-12 13:24:24 +00:00
|
|
|
|
2000-10-04 03:17:36 +00:00
|
|
|
if [ $# -eq 1 ]
|
|
|
|
then
|
|
|
|
dir=$1
|
|
|
|
else
|
|
|
|
dir=.
|
|
|
|
fi
|
|
|
|
|
2000-07-12 13:24:24 +00:00
|
|
|
if [ -r ../src/lyx ]
|
|
|
|
then
|
|
|
|
lyx=../src/lyx
|
|
|
|
else
|
2000-10-02 04:21:44 +00:00
|
|
|
# Assumed to be on the path
|
2003-10-13 09:50:10 +00:00
|
|
|
lyx=lyx
|
2000-07-12 13:24:24 +00:00
|
|
|
fi
|
|
|
|
|
2001-01-09 13:58:48 +00:00
|
|
|
if [ -z "`grep literate-article textclass.lst`" ]
|
|
|
|
then
|
|
|
|
touch listerrors
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2000-10-23 12:16:05 +00:00
|
|
|
$lyx --export literate $dir/examples/Literate.lyx
|
2000-10-04 03:17:36 +00:00
|
|
|
# if no literate support stuff is installed nothing will be output
|
|
|
|
if [ -f $dir/examples/Literate.nw ]
|
|
|
|
then
|
|
|
|
mv $dir/examples/Literate.nw Literate.nw
|
|
|
|
which notangle 2>/dev/null && notangle -Rbuild-script Literate.nw | sh
|
2000-10-05 07:57:00 +00:00
|
|
|
else
|
|
|
|
# you don't have noweb installed so we'll produce a dummy file
|
|
|
|
# just so make doesn't keep trying to output it.
|
|
|
|
touch listerrors
|
2001-01-09 13:58:48 +00:00
|
|
|
# tell the user nothing bad happened
|
|
|
|
echo
|
|
|
|
echo "LyX did not detect NoWeb support. Proceeding normally."
|
2000-10-04 03:17:36 +00:00
|
|
|
fi
|
2000-10-05 07:57:00 +00:00
|
|
|
|
|
|
|
exit 0
|