Advertisement
Guest User

Untitled

a guest
Aug 5th, 2022
652
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. #!/bin/sh
  2. # Copyright (C) 2010-2018 Greenbone Networks GmbH
  3. #
  4. # SPDX-License-Identifier: GPL-2.0-or-later
  5. #
  6. # This program is free software; you can redistribute it and/or
  7. # modify it under the terms of the GNU General Public License
  8. # as published by the Free Software Foundation; either version 2
  9. # of the License, or (at your option) any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19.  
  20. # Report generator script: PDF.
  21. #
  22. # This report generate initially creates a LaTeX file
  23. # using a XML transformation with the tool xsltproc.
  24. # In a second step the latex file is processed with
  25. # the tool pdflatex and results in the final PDF file.
  26. # The intermediate files are stored under /tmp.
  27.  
  28. TMP=`mktemp -d` || exit 1
  29.  
  30. xsltproc ./latex.xsl $1 > ${TMP}/report.tex 2>/tmp/err.out
  31.  
  32. pdflatex -interaction batchmode -output-directory ${TMP} ${TMP}/report.tex > /dev/null 2>&1
  33.  
  34. # Run a second time to resolve references and page numbering as assembled
  35. # during first run.
  36. pdflatex -interaction batchmode -output-directory ${TMP} ${TMP}/report.tex > /dev/null 2>&1 &
  37.  
  38. wait
  39.  
  40. cat ${TMP}/report.pdf
  41.  
  42. # delete removed
  43. #&& rm -rf ${TMP}
  44.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement