mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
generate_manuals_for_web: switch to xhtml, and use a random userdir while exporting, so no cached pic can be found.
This commit is contained in:
parent
491bf1db24
commit
a0e95a2c1b
@ -22,13 +22,16 @@ MAIN_DOCS=${MAIN_DOCS:-"Intro Tutorial UserGuide Math Additional Customization S
|
|||||||
LYX=${LYX:-${PWD}/src/lyx}
|
LYX=${LYX:-${PWD}/src/lyx}
|
||||||
OUT=${OUT:-$HOME/web/lyxdoc}
|
OUT=${OUT:-$HOME/web/lyxdoc}
|
||||||
TOC=${TOC:-lyxdoc/index.html}
|
TOC=${TOC:-lyxdoc/index.html}
|
||||||
TMP=${TMP:-$(mktemp -d)}
|
TMP=${TMP:-$(mktemp -d --tmpdir lyx-docs-XXXX)}
|
||||||
|
USERDIR=${USERDIR:-$(mktemp -d --tmpdir lyx-home-XXXX)}
|
||||||
|
|
||||||
echo LYX=$LYX
|
echo LYX=$LYX
|
||||||
echo OUT=$OUT
|
echo OUT=$OUT
|
||||||
echo TOC=$TOC
|
echo TOC=$TOC
|
||||||
echo TMP=$TMP
|
echo TMP=$TMP
|
||||||
|
|
||||||
|
echo "Building docs: $MAIN_DOCS"
|
||||||
|
|
||||||
mycpus=$(grep -c processor /proc/cpuinfo)
|
mycpus=$(grep -c processor /proc/cpuinfo)
|
||||||
function pexec {
|
function pexec {
|
||||||
while [ $(pidof lyx | wc -w) -ge $[$mycpus*15/10] -o $(pidof lyx | wc -w) -ge $[$mycpus*15/10] ]; do
|
while [ $(pidof lyx | wc -w) -ge $[$mycpus*15/10] -o $(pidof lyx | wc -w) -ge $[$mycpus*15/10] ]; do
|
||||||
@ -70,22 +73,22 @@ EOF
|
|||||||
for m in $MAIN_DOCS; do
|
for m in $MAIN_DOCS; do
|
||||||
echo "<tr><td>$m</td><td>" >> $TOC
|
echo "<tr><td>$m</td><td>" >> $TOC
|
||||||
find . -name $m.lyx | while read f; do
|
find . -name $m.lyx | while read f; do
|
||||||
if [ ! -f lyxdoc/${f%%.lyx}.html.LyXconv/$m.html ]; then
|
if [ ! -f lyxdoc/${f%%.lyx}.xhtml ]; then
|
||||||
pexec $LYX -E xhtml lyxdoc/${f%%.lyx}.html $f;
|
pexec $LYX -userdir $USERDIR -E xhtml lyxdoc/${f%%.lyx}.xhtml $f;
|
||||||
else
|
else
|
||||||
echo "Skipping already existing lyxdoc/${f%%.lyx}.html"
|
echo "Skipping already existing lyxdoc/${f%%.lyx}.xhtml"
|
||||||
fi
|
fi
|
||||||
if echo $f | grep '/[a-zA-Z_]\+/' > /dev/null 2>&1; then
|
if echo $f | grep '/[a-zA-Z_]\+/' > /dev/null 2>&1; then
|
||||||
lang=$(echo $f | sed -e 's#.*/\([a-zA-Z_]\+\)/.*#\1#')
|
lang=$(echo $f | sed -e 's#.*/\([a-zA-Z_]\+\)/.*#\1#')
|
||||||
else
|
else
|
||||||
lang=en
|
lang=en
|
||||||
fi
|
fi
|
||||||
echo "<a href=\"${f%%.lyx}.html\">[$lang]</a>" >> $TOC
|
echo "<a href=\"${f%%.lyx}.xhtml\">[$lang]</a>" >> $TOC
|
||||||
done
|
done
|
||||||
echo "</td><td>" >> $TOC
|
echo "</td><td>" >> $TOC
|
||||||
find . -name $m.lyx | while read f; do
|
find . -name $m.lyx | while read f; do
|
||||||
if [ ! -f lyxdoc/${f%%.lyx}.pdf ]; then
|
if [ ! -f lyxdoc/${f%%.lyx}.pdf ]; then
|
||||||
pexec $LYX -E pdf lyxdoc/${f%%.lyx}.pdf $f;
|
pexec $LYX -userdir $USERDIR -E pdf lyxdoc/${f%%.lyx}.pdf $f;
|
||||||
else
|
else
|
||||||
echo "Skipping already existing lyxdoc/${f%%.lyx}.pdf"
|
echo "Skipping already existing lyxdoc/${f%%.lyx}.pdf"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user