install-gitea/download-gitea.sh

12 lines
369 B
Bash
Raw Normal View History

2024-01-08 10:48:54 +02:00
#!/usr/bin/env bash
RELEASES_URL="https://api.github.com/repos/go-gitea/gitea/releases/latest"
RELEASE_URLS=$(curl --silent "${RELEASES_URL}" | jq -r '.assets[] | select (.name|test("linux-amd64")) | .browser_download_url')
DOWNLOAD_URL=$(echo "${RELEASE_URLS}" | egrep "linux\-amd64$")
2024-01-23 11:09:05 +02:00
stat "gitea-linux-amd64" || \
wget "${DOWNLOAD_URL}" -O "gitea-linux-amd64"