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:
parent
70a1cfbe28
commit
08648aca15
@ -29,10 +29,11 @@ function update_script() {
|
|||||||
fi
|
fi
|
||||||
RELEASE=$(curl -fsSL https://github.com/go-gitea/gitea/releases/latest | grep "title>Release" | cut -d " " -f 4 | sed 's/^v//')
|
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}"
|
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
|
systemctl stop gitea
|
||||||
rm -rf /usr/local/bin/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
|
chmod +x /usr/local/bin/gitea
|
||||||
systemctl start gitea
|
systemctl start gitea
|
||||||
msg_ok "Updated $APP Successfully"
|
msg_ok "Updated $APP Successfully"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user