donau

Donation authority for GNU Taler (experimental)
Log | Files | Refs | Submodules | README | LICENSE

update-pp.sh (1033B)


      1 #!/bin/sh
      2 # This file is in the public domain
      3 
      4 # Should be called with the list of languages to generate, i.e.
      5 # $ ./update-pp.sh en de fr it
      6 
      7 # Error checking on
      8 set -eu
      9 echo "Generating PP for ETag $VERSION"
     10 
     11 rm -f sphinx.log sphinx.err
     12 # We process inputs using Makefile in tos/ directory
     13 cd pp
     14 for l in $@
     15 do
     16     mkdir -p $l
     17     echo "Generating PP for language $l"
     18     cat conf.py.in | sed -e "s/%VERSION%/$VERSION/g" > conf.py
     19     # 'f' is for the supported formats, note that the 'make' target
     20     # MUST match the file extension.
     21     for f in html txt pdf epub xml
     22     do
     23         rm -rf _build
     24         echo "  Generating format $f"
     25         make -e SPHINXOPTS="-D language='$l'" $f >>sphinx.log 2>>sphinx.err < /dev/null
     26         if test $f = "html"
     27         then
     28             htmlark -o $l/${VERSION}.$f _build/$f/${VERSION}.$f
     29         else
     30             mv _build/$f/${VERSION}.$f $l/${VERSION}.$f
     31         fi
     32         if test $f = "txt"
     33         then
     34             cp $l/${VERSION}.$f $l/${VERSION}.md
     35         fi
     36     done
     37 done
     38 cd ..