From d78b0b987a810b6284670db01cd826cb6c01821f Mon Sep 17 00:00:00 2001 From: Volodymyr Stoiko Date: Wed, 28 Feb 2024 21:48:43 +0200 Subject: [PATCH] Remove brew version before installing with script (#1503) Co-authored-by: Alon Girmonsky <1990761+alongir@users.noreply.github.com> --- install.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/install.sh b/install.sh index 167241f23..d95bd8dd4 100644 --- a/install.sh +++ b/install.sh @@ -36,6 +36,15 @@ if [ $? != 0 ] ; then exit 1 fi +# Check for Homebrew and kubeshark installation +if command -v brew >/dev/null; then + if brew list kubeshark &>/dev/null; then + echo "📦 Found $PROG_NAME instance installed with Homebrew" + echo "${ESC}${F_GREEN}m⬇️ Removing before installation with script${ESC}${F_DEFAULT}m" + brew uninstall kubeshark + fi +fi + echo "\n🦈 ${ESC}${F_DEFAULT};${B_BLUE}m Started to download $PROG_NAME ${ESC}${B_DEFAULT};${F_DEFAULT}m" if curl -# --fail -Lo $EXE_NAME ${REPO}/releases/latest/download/${EXE_NAME}_${OS}_${ARCH} ; then