mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Merge pull request #35656 from rmmh/sha1sum
Automatic merge from submit-queue Prefer sha1sum (C) to shasum (Perl). This should avoid spamming build-log.txt with messages like: perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). OSX has shasum but not sha1sum, which is part of GNU coreutils.
This commit is contained in:
commit
e233f14ad5
@ -187,10 +187,10 @@ function kube::release::md5() {
|
||||
}
|
||||
|
||||
function kube::release::sha1() {
|
||||
if which shasum >/dev/null 2>&1; then
|
||||
shasum -a1 "$1" | awk '{ print $1 }'
|
||||
else
|
||||
if which sha1sum >/dev/null 2>&1; then
|
||||
sha1sum "$1" | awk '{ print $1 }'
|
||||
else
|
||||
shasum -a1 "$1" | awk '{ print $1 }'
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -817,10 +817,10 @@ EOF
|
||||
}
|
||||
|
||||
function sha1sum-file() {
|
||||
if which shasum >/dev/null 2>&1; then
|
||||
shasum -a1 "$1" | awk '{ print $1 }'
|
||||
else
|
||||
if which sha1sum >/dev/null 2>&1; then
|
||||
sha1sum "$1" | awk '{ print $1 }'
|
||||
else
|
||||
shasum -a1 "$1" | awk '{ print $1 }'
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -104,10 +104,10 @@ function md5sum_file() {
|
||||
}
|
||||
|
||||
function sha1sum_file() {
|
||||
if which shasum >/dev/null 2>&1; then
|
||||
shasum -a1 "$1" | awk '{ print $1 }'
|
||||
else
|
||||
if which sha1sum >/dev/null 2>&1; then
|
||||
sha1sum "$1" | awk '{ print $1 }'
|
||||
else
|
||||
shasum -a1 "$1" | awk '{ print $1 }'
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user