From fa7aead863882666ecbe98037d3331311c9514d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Thu, 1 May 2025 22:34:54 +0200 Subject: [PATCH] Readeck: Fix release crawling (#4172) * Update release crawling * Fix update procedure release crawling * Update --- ct/readeck.sh | 34 +++++++++++++++++----------------- install/readeck-install.sh | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/ct/readeck.sh b/ct/readeck.sh index 3227d674b..a32e3be6e 100644 --- a/ct/readeck.sh +++ b/ct/readeck.sh @@ -20,23 +20,23 @@ color catch_errors function update_script() { - header_info - check_container_storage - check_container_resources - if [[ ! -d /opt/readeck ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - msg_info "Updating ${APP}" - LATEST=$(curl -fsSL https://codeberg.org/readeck/readeck/releases/ | grep -oP '(?<=Version )\d+\.\d+\.\d+' | head -1) - systemctl stop readeck.service - rm -rf /opt/readeck/readeck - cd /opt/readeck -curl -fsSL "https://codeberg.org/readeck/readeck/releases/download/${LATEST}/readeck-${LATEST}-linux-amd64" -o "readeck" - chmod a+x readeck - systemctl start readeck.service - msg_ok "Updated ${APP}" + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/readeck ]]; then + msg_error "No ${APP} Installation Found!" exit + fi + msg_info "Updating ${APP}" + LATEST=$(curl -fsSL https://codeberg.org/readeck/readeck/releases/ | grep -oP '/releases/tag/\K\d+\.\d+\.\d+' | head -1) + systemctl stop readeck.service + rm -rf /opt/readeck/readeck + cd /opt/readeck + curl -fsSL "https://codeberg.org/readeck/readeck/releases/download/${LATEST}/readeck-${LATEST}-linux-amd64" -o "readeck" + chmod a+x readeck + systemctl start readeck.service + msg_ok "Updated ${APP}" + exit } start @@ -46,4 +46,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8000${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8000${CL}" diff --git a/install/readeck-install.sh b/install/readeck-install.sh index 292e1a8a1..9541a2e9d 100644 --- a/install/readeck-install.sh +++ b/install/readeck-install.sh @@ -14,7 +14,7 @@ network_check update_os msg_info "Installing Readeck" -LATEST=$(curl -fsSL https://codeberg.org/readeck/readeck/releases/ | grep -oP '(?<=Version )\d+\.\d+\.\d+' | head -1) +LATEST=$(curl -fsSL https://codeberg.org/readeck/readeck/releases/ | grep -oP '/releases/tag/\K\d+\.\d+\.\d+' | head -1) mkdir -p /opt/readeck cd /opt/readeck curl -fsSL "https://codeberg.org/readeck/readeck/releases/download/${LATEST}/readeck-${LATEST}-linux-amd64" -o "readeck"