aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/tools/typesetting/tex/nix/lhs2tex.sh
blob: bfef3df6b0e1f41b4f46f672359dfe3b64a6bfe5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
source $stdenv/setup

mkdir -p $out

mkdir root
cd root

startDir=$(perl $copyIncludes $includes)
cd $startDir

lhstex() {
    sourceFile=$1
    targetName=$out/$(basename $(stripHash $sourceFile) .lhs).tex
    echo "converting $sourceFile to $targetName..."
    lhs2TeX -o "$targetName" $flags "$sourceFile"
}

lhstex $source