mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-06-30 11:07:38 +00:00
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.
This commit is contained in:
@ -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"
|
||||
|
Reference in New Issue
Block a user