From 07a3ab353c902531c53d5c894d78e98dcd157159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Fri, 28 Mar 2025 21:31:15 +0100 Subject: [PATCH] GoMFT: Fix release grep (#3462) * Fix release grep * Fix release grep in update function --- ct/gomft.sh | 2 +- install/gomft-install.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/gomft.sh b/ct/gomft.sh index a274d2977..d1931b7d7 100644 --- a/ct/gomft.sh +++ b/ct/gomft.sh @@ -28,7 +28,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - RELEASE=$(curl -s https://api.github.com/repos/StarFleetCPTN/GoMFT/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + RELEASE=$(curl -s https://api.github.com/repos/StarFleetCPTN/GoMFT/releases/latest | grep "tag_name" | awk '{print substr($2, 4, length($2)-5) }') if ! dpkg -l | grep -q "^ii.*build-essential"; then $STD apt-get install -y build-essential fi diff --git a/install/gomft-install.sh b/install/gomft-install.sh index ebf32b437..0c6c5b093 100644 --- a/install/gomft-install.sh +++ b/install/gomft-install.sh @@ -34,7 +34,7 @@ msg_ok "Setup Golang" msg_info "Setup ${APPLICATION} (Patience)" temp_file=$(mktemp) -RELEASE=$(curl -s https://api.github.com/repos/StarFleetCPTN/GoMFT/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +RELEASE=$(curl -s https://api.github.com/repos/StarFleetCPTN/GoMFT/releases/latest | grep "tag_name" | awk '{print substr($2, 4, length($2)-5) }') wget -q "https://github.com/StarFleetCPTN/GoMFT/archive/refs/tags/v${RELEASE}.tar.gz" -O $temp_file tar -xzf $temp_file mv GoMFT-${RELEASE}/ /opt/gomft