summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-05-04 15:44:58 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2016-05-04 15:44:58 +0200
commit5d9e7e37114237887ed98e95a1fe617e70cbd3b2 (patch)
tree4ea389ef512db50b9e34d7e05551f9cde9de9e48
parentf3b9cb37eeebbe802c216b4ef159789900883f64 (diff)
downloadnixos-5d9e7e37114237887ed98e95a1fe617e70cbd3b2.tar
nixos-5d9e7e37114237887ed98e95a1fe617e70cbd3b2.tar.gz
nixos-5d9e7e37114237887ed98e95a1fe617e70cbd3b2.tar.bz2
nixos-5d9e7e37114237887ed98e95a1fe617e70cbd3b2.tar.xz
nixos-5d9e7e37114237887ed98e95a1fe617e70cbd3b2.zip
don’t use tee
-rw-r--r--ymir.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/ymir.nix b/ymir.nix
index 2b94f31c..80580442 100644
--- a/ymir.nix
+++ b/ymir.nix
@@ -90,7 +90,9 @@ in rec {
90 90
91 TRAPEXIT() { [[ -n "''${tmpFile}" && -e "''${tmpFile}" ]] && rm -f "''${tmpFile}" } 91 TRAPEXIT() { [[ -n "''${tmpFile}" && -e "''${tmpFile}" ]] && rm -f "''${tmpFile}" }
92 92
93 prefix=$(tee "''${tmpFile}" | sha512sum | awk '{ print $1; }' | head -c 10) 93 cat >! "''${tmpFile}"
94
95 prefix=$(sha512sum "''${tmpFile}" | awk '{ print $1; }' | head -c 10)
94 prefix=''${prefix:l} 96 prefix=''${prefix:l}
95 filename="$1" 97 filename="$1"
96 98