diff --git a/gitea-loader.sh b/gitea-loader.sh index 8bb30b6..b99e5fb 100755 --- a/gitea-loader.sh +++ b/gitea-loader.sh @@ -83,8 +83,13 @@ curl \ - -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" \ - "https://api.github.com/repos/go-gitea/gitea/releases?per_page=15" > "gitea-releases.json" + -L \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/go-gitea/gitea/releases?per_page=15" \ + > "gitea-releases.json" 2>/dev/null || { + exit 1 + } for x in {3..15}; do GITEAVERSION="$(cat gitea-releases.json | jq -r ".[$x].tag_name" | grep -aoE '[0-9]+\.[0-9]+\.[0-9]+')"