nixpkgs/pkgs/misc/tex/nix/dot2ps.sh
Eelco Dolstra c556a6ea46 * "ensureDir" -> "mkdir -p". "ensureDir" is a rather pointless
function, so obsolete it.

svn path=/nixpkgs/branches/stdenv-updates/; revision=31644
2012-01-18 20:16:00 +00:00

20 lines
374 B
Bash

source $stdenv/setup
mkdir -p $out
dot2ps() {
sourceFile=$1
targetName=$out/$(basename $(stripHash $sourceFile; echo $strippedName) .dot).ps
echo "converting $sourceFile to $targetName..."
dot -Tps $sourceFile > $targetName
}
for i in $dotGraph; do
if test -d $i; then
for j in $i/*; do dot2ps $j; done
else
dot2ps $i
fi
done