mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-08 20:50:24 +00:00
Improving syntax for bash scripts
This commit is contained in:
@@ -47,12 +47,12 @@ kube::etcd::validate() {
|
||||
|
||||
# validate installed version is at least equal to minimum
|
||||
version=$(etcd --version | tail -n +1 | head -n 1 | cut -d " " -f 3)
|
||||
if [[ $(kube::etcd::version $ETCD_VERSION) -gt $(kube::etcd::version $version) ]]; then
|
||||
export PATH=$KUBE_ROOT/third_party/etcd:$PATH
|
||||
if [[ $(kube::etcd::version ${ETCD_VERSION}) -gt $(kube::etcd::version ${version}) ]]; then
|
||||
export PATH=${KUBE_ROOT}/third_party/etcd:$PATH
|
||||
hash etcd
|
||||
echo $PATH
|
||||
version=$(etcd --version | head -n 1 | cut -d " " -f 3)
|
||||
if [[ $(kube::etcd::version $ETCD_VERSION) -gt $(kube::etcd::version $version) ]]; then
|
||||
if [[ $(kube::etcd::version ${ETCD_VERSION}) -gt $(kube::etcd::version ${version}) ]]; then
|
||||
kube::log::usage "etcd version ${ETCD_VERSION} or greater required."
|
||||
kube::log::info "You can use 'hack/install-etcd.sh' to install a copy in third_party/."
|
||||
exit 1
|
||||
|
Reference in New Issue
Block a user