mirror of
https://codeberg.org/forgejo/docs.git
synced 2025-05-11 21:26:43 +03:00
scripts/cli-docs: do not polute the output
(cherry picked from commit bf93436802
)
This commit is contained in:
parent
94b1afa4fe
commit
bf5b6bbd76
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue