From e71a5cb87841f0af4a2279517b77a9a07ba394c0 Mon Sep 17 00:00:00 2001 From: zimbatm Date: Thu, 23 Jun 2016 11:53:45 +0100 Subject: stdenv: introduce baseHash() to replace stripHash() stripHash uses a global variable to communicate it's computation results, but it's not necessary. You can just pipe to stdout in a subshell. A function mostly behaves like just another command. baseHash() also introduces a suffix-stripping capability since it's something the users of the function tend to use. --- pkgs/tools/typesetting/tex/nix/animatedot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkgs/tools/typesetting/tex/nix/animatedot.sh') diff --git a/pkgs/tools/typesetting/tex/nix/animatedot.sh b/pkgs/tools/typesetting/tex/nix/animatedot.sh index 46a2c515e03a..1b5b2ce50795 100644 --- a/pkgs/tools/typesetting/tex/nix/animatedot.sh +++ b/pkgs/tools/typesetting/tex/nix/animatedot.sh @@ -4,6 +4,6 @@ mkdir -p $out for ((i = 1; i <= $nrFrames; i++)); do echo "producing frame $i..."; - targetName=$out/$(basename $(stripHash $dotGraph; echo $strippedName) .dot)-f-$i.dot + targetName=$out/$(baseHash $dotGraph .dot)-f-$i.dot cpp -DFRAME=$i < $dotGraph > $targetName done -- cgit 1.4.1