kube-up: move sha1sum-file into common

Also hash the tar files in AWS kube-up
This commit is contained in:
Justin Santa Barbara
2016-01-17 21:15:05 -05:00
parent a70412099a
commit 4d88a4ed2c
3 changed files with 13 additions and 8 deletions

View File

@@ -441,3 +441,11 @@ function build-runtime-config() {
fi
fi
}
function sha1sum-file() {
if which shasum >/dev/null 2>&1; then
shasum -a1 "$1" | awk '{ print $1 }'
else
sha1sum "$1" | awk '{ print $1 }'
fi
}