mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
copy kube::release:md5 to kube::util::md5
This commit is contained in:
parent
d9b5aa2ea9
commit
7b0ea99a3e
@ -702,6 +702,15 @@ function kube::util::require-jq {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# outputs md5 hash of $1, works on macOS and Linux
|
||||||
|
function kube::util::md5() {
|
||||||
|
if which md5 >/dev/null 2>&1; then
|
||||||
|
md5 -q "$1"
|
||||||
|
else
|
||||||
|
md5sum "$1" | awk '{ print $1 }'
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# kube::util::read-array
|
# kube::util::read-array
|
||||||
# Reads in stdin and adds it line by line to the array provided. This can be
|
# Reads in stdin and adds it line by line to the array provided. This can be
|
||||||
# used instead of "mapfile -t", and is bash 3 compatible.
|
# used instead of "mapfile -t", and is bash 3 compatible.
|
||||||
|
Loading…
Reference in New Issue
Block a user