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"