mirror of
https://gitea.blesmrt.net/mikaela/scripts.git
synced 2025-01-03 16:52:31 +01:00
download-forgejo.bash: initial commit
This commit is contained in:
parent
84e7d4fb00
commit
1f29857a2f
1
bash/.gitignore
vendored
1
bash/.gitignore
vendored
@ -2,3 +2,4 @@
|
|||||||
*.png
|
*.png
|
||||||
*.jpg
|
*.jpg
|
||||||
*.jpeg
|
*.jpeg
|
||||||
|
forgejo-*
|
||||||
|
30
bash/download-forgejo.bash
Executable file
30
bash/download-forgejo.bash
Executable file
@ -0,0 +1,30 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
VERSION=1.18.3-2
|
||||||
|
PLATFORM=linux-amd64
|
||||||
|
|
||||||
|
# If the signature is already downloaded, don't redownload it
|
||||||
|
if [ -f "forgejo-$VERSION-$PLATFORM.asc" ]
|
||||||
|
then
|
||||||
|
printf "Forĝejo signature already downloaded.\n"
|
||||||
|
else
|
||||||
|
printf "Downloading Forĝejo $VERSION-$PLATFORM signature…\n"
|
||||||
|
curl -LO "https://codeberg.org/forgejo/forgejo/releases/download/v$VERSION/forgejo-$VERSION-$PLATFORM.asc"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If the binary is already downloaded, don't redownload it
|
||||||
|
if [ -f "forgejo-$VERSION-$PLATFORM" ]
|
||||||
|
then
|
||||||
|
printf "Forĝejo already downloaded.\n"
|
||||||
|
else
|
||||||
|
printf "Downloading Forĝejo $VERSION on $PLATFORM…\n"
|
||||||
|
curl -LO "https://codeberg.org/forgejo/forgejo/releases/download/v$VERSION/forgejo-$VERSION-$PLATFORM"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# The last easy to automate part.
|
||||||
|
printf "Verifying signature…\n"
|
||||||
|
gpg --verify forgejo-$VERSION-$PLATFORM.asc
|
||||||
|
|
||||||
|
printf "Final steps: \n\t 1. Place the binary. \n\t \
|
||||||
|
2. sudo ln -s forgejo-$VERSION-$PLATFORM gitea \n\t \
|
||||||
|
3. sudo systemctl restart gitea \n\t 4. If the\
|
||||||
|
binary was renamed, run hook update from Forĝejo settings."
|
Loading…
Reference in New Issue
Block a user