Skip to content

Commit 08648ac

Browse files
authored
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.
1 parent 70a1cfb commit 08648ac

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ct/gitea.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ function update_script() {
2929
fi
3030
RELEASE=$(curl -fsSL https://github.com/go-gitea/gitea/releases/latest | grep "title>Release" | cut -d " " -f 4 | sed 's/^v//')
3131
msg_info "Updating $APP to ${RELEASE}"
32-
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")
32+
FILENAME="gitea-$RELEASE-linux-amd64"
33+
curl -fsSL "https://github.com/go-gitea/gitea/releases/download/v$RELEASE/gitea-$RELEASE-linux-amd64" -o $FILENAME
3334
systemctl stop gitea
3435
rm -rf /usr/local/bin/gitea
35-
mv gitea* /usr/local/bin/gitea
36+
mv $FILENAME /usr/local/bin/gitea
3637
chmod +x /usr/local/bin/gitea
3738
systemctl start gitea
3839
msg_ok "Updated $APP Successfully"

0 commit comments

Comments
 (0)