* runLaTeX: added an option to copy the collected TeX inputs to $out

(useful when you need to send TeX sources for a paper to a third
  party).

svn path=/nixpkgs/trunk/; revision=11837
This commit is contained in:
Eelco Dolstra 2008-05-16 11:48:46 +00:00
parent 3042994875
commit 374ccd290b
2 changed files with 10 additions and 1 deletions

View file

@ -11,6 +11,7 @@ rec {
, compressBlanksInIndex ? true
, packages ? []
, searchRelativeTo ? dirOf (toString rootFile) # !!! duplication
, copySources ? false
}:
assert generatePDF -> !generatePS;
@ -22,7 +23,7 @@ rec {
copyIncludes = ./copy-includes.pl;
inherit rootFile generatePDF generatePS extraFiles
compressBlanksInIndex;
compressBlanksInIndex copySources;
includes = import (findLaTeXIncludes {inherit rootFile searchRelativeTo;});

View file

@ -2,6 +2,9 @@ source $stdenv/setup
ensureDir $out
mkdir root
cd root
startDir=$(perl $copyIncludes $includes)
cd $startDir
@ -48,6 +51,11 @@ runLaTeX() {
echo
if test -n "$copySources"; then
cp -prd $TMPDIR/root $out/tex-srcs
fi
echo "PASS 1..."
runLaTeX
echo