From bef6bef0d2ce2ef7cfaa3e9f1eac2cdc793560c4 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Tue, 11 Oct 2016 18:09:56 +0200 Subject: stdenv/stripHash: print to stdout, not to variable `stripHash` documentation states that it prints out the stripped name to the stdout, but the function stored the value in `strippedName` instead. Basically all usages did something like `$(stripHash $foo | echo $strippedName)` which is just braindamaged. Fixed the implementation and all invocations. --- pkgs/stdenv/generic/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkgs/stdenv/generic/setup.sh') diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index feb82fd92266..15238a44598d 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -495,7 +495,7 @@ dumpVars() { stripHash() { strippedName=$(basename $1); if echo "$strippedName" | grep -q '^[a-z0-9]\{32\}-'; then - strippedName=$(echo "$strippedName" | cut -c34-) + echo "$strippedName" | cut -c34- fi } -- cgit 1.4.1