Browse Source

new: dev: small refactor of ``file_get_hash`` !minor

test
Valentin Lab 6 years ago
parent
commit
208aa1ad7f
  1. 12
      bin/compose-core

12
bin/compose-core

@ -2241,12 +2241,18 @@ clean_unused_docker_compose() {
export -f clean_unused_docker_compose export -f clean_unused_docker_compose
file_get_hash() {
local file="$1" sha
sha=$(sha256sum "$file")
stdin_get_hash() {
local sha
sha=$(sha256sum) || return 1
sha=${sha:0:64} sha=${sha:0:64}
echo "$sha" echo "$sha"
} }
export -f stdin_get_hash
file_get_hash() {
stdin_get_hash < "$1" || return 1
}
export -f file_get_hash export -f file_get_hash

Loading…
Cancel
Save