X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Fbuild-listerrors;h=392a9cf31f93a01f8288a98847703927d0c7b474;hb=98c966c64594611e469313314abd1e59524adb4a;hp=a7d3cea18475bc733caa178f3cb4b13425db35fb;hpb=0e86ed5583391a8a038d443c2b09d86ca8a658c6;p=lyx.git diff --git a/lib/build-listerrors b/lib/build-listerrors index a7d3cea184..392a9cf31f 100755 --- a/lib/build-listerrors +++ b/lib/build-listerrors @@ -6,6 +6,13 @@ # # Assume notangle is on the path +if [ $# -eq 1 ] +then + dir=$1 +else + dir=. +fi + if [ -r ../src/lyx ] then lyx=../src/lyx @@ -14,6 +21,25 @@ else lyx=lyx fi -$lyx --export tex examples/Literate.lyx -mv examples/Literate.tex Literate.nw -notangle -Rbuild-script Literate.nw | sh +if [ -z "`grep literate-article textclass.lst`" ] +then + touch listerrors + exit 0 +fi + +$lyx --export literate $dir/examples/Literate.lyx +# 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 +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 + # tell the user nothing bad happened + echo + echo "LyX did not detect NoWeb support. Proceeding normally." +fi + +exit 0