scripts/cli-docs: do not polute the output

(cherry picked from commit bf93436802)
This commit is contained in:
Earl Warren 2023-12-31 17:27:54 +01:00
parent 94b1afa4fe
commit bf5b6bbd76
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -22,10 +22,12 @@ function latest() {
} }
function download() { function download() {
local major="$1"
if test -f /tmp/forgejo ; then if test -f /tmp/forgejo ; then
return return
fi fi
local version=$(latest) local version=$(latest $major)
curl -sS "https://codeberg.org/forgejo/forgejo/releases/download/${version}/forgejo-${version#v}-linux-amd64" > ${FORGEJO} curl -sS "https://codeberg.org/forgejo/forgejo/releases/download/${version}/forgejo-${version#v}-linux-amd64" > ${FORGEJO}
chmod +x ${FORGEJO} chmod +x ${FORGEJO}
} }
@ -155,7 +157,7 @@ function cleanup() {
function run() { function run() {
local version="$1" local version="$1"
dependencies dependencies >& /dev/null
download $version download $version
generate | cleanup generate | cleanup
} }