Changed a KUBECTL_LOCATION

This commit is contained in:
Marcin Woźniak 2024-12-28 23:03:04 +01:00
parent d32b241062
commit 7a4198c736
Signed by: y0rune
GPG Key ID: F204C385F57EB348

View File

@ -355,9 +355,9 @@ function install_kubernetes() {
LINK=""
CURRENT_VERSION=""
REMOTE_VERSION=$(curl -L -s https://dl.k8s.io/release/stable.txt)
KUBECTL_LOCATION="$HOME/.local/bin/kubectl"
KUBECTL_LOCATION="/opt/homebrew/bin/kubectl"
[ -f $HOME/.local/bin/kubectl ] && CURRENT_VERSION=$($KUBECTL_LOCATION version --client | grep --color=no -iEo 'Client Version: v[0-9\.]+' | grep -ioE --color=no 'v[0-9\.]+')
[ -f $KUBECTL_LOCATION ] && CURRENT_VERSION=$($KUBECTL_LOCATION version --client | grep --color=no -iEo 'Client Version: v[0-9\.]+' | grep -ioE --color=no 'v[0-9\.]+')
if [ "$REMOTE_VERSION" == "$CURRENT_VERSION" ]; then
timestamp "The current version of the kubectl is the same as the newest version"