From 1d15e0d1a9d4aa7e5b0cb5e15a4ab52c2e856070 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Fri, 15 Dec 2017 23:41:44 +0100 Subject: [PATCH] _autoenv_hash_pair: use sha1sum for v1 hashes shasum was replaced by sha1sum before, and appears to have been added back accidentally in dfb5648. --- autoenv.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autoenv.zsh b/autoenv.zsh index 538e92f..2dbafe5 100644 --- a/autoenv.zsh +++ b/autoenv.zsh @@ -178,11 +178,11 @@ _autoenv_hash_pair() { echo "Missing file argument for _autoenv_hash_pair!" >&2 return 1 fi - if [ $cksum_version = 2 ]; then + if [[ $cksum_version = 2 ]]; then # Get the output from `cksum` and join the first two words with a dot. env_cksum=${(j:.:)${:-$(cksum "$env_file")}[1,2]} - elif [ $cksum_version = 1 ]; then - env_cksum=$(shasum $env_file | cut -d' ' -f1) + elif [[ $cksum_version = 1 ]]; then + env_cksum=$(sha1sum $env_file | cut -d' ' -f1) else echo "Invalid version argument (${cksum_version}) for _autoenv_hash_pair!" >&2 return 1 -- 2.44.0