From 08648aca15a69ac7225a3963885adc674ce3d5cd Mon Sep 17 00:00:00 2001 From: Tyler Stuyfzand Date: Sun, 22 Jun 2025 06:27:01 -0400 Subject: [PATCH] gitea: Update gitea.sh to stop update failures (#5361) When updating gitea using the update command on Debian 12, if you have any other files or directories starting with the name gitea it will fail. This update will make it use a set file name for the output and mv operation which resolves the issue. --- ct/gitea.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ct/gitea.sh b/ct/gitea.sh index 3b957d2c0..def9044b1 100644 --- a/ct/gitea.sh +++ b/ct/gitea.sh @@ -29,10 +29,11 @@ function update_script() { fi RELEASE=$(curl -fsSL https://github.com/go-gitea/gitea/releases/latest | grep "title>Release" | cut -d " " -f 4 | sed 's/^v//') msg_info "Updating $APP to ${RELEASE}" - curl -fsSL "https://github.com/go-gitea/gitea/releases/download/v$RELEASE/gitea-$RELEASE-linux-amd64" -o $(basename "https://github.com/go-gitea/gitea/releases/download/v$RELEASE/gitea-$RELEASE-linux-amd64") + FILENAME="gitea-$RELEASE-linux-amd64" + curl -fsSL "https://github.com/go-gitea/gitea/releases/download/v$RELEASE/gitea-$RELEASE-linux-amd64" -o $FILENAME systemctl stop gitea rm -rf /usr/local/bin/gitea - mv gitea* /usr/local/bin/gitea + mv $FILENAME /usr/local/bin/gitea chmod +x /usr/local/bin/gitea systemctl start gitea msg_ok "Updated $APP Successfully"