dataset/seed/applicationservice/2022.03.08/gitea/manual/image/postinstall/gitea.sh

24 lines
861 B
Bash
Raw Normal View History

2022-03-08 19:42:28 +01:00
#!/bin/bash
set -ex
gpg --keyserver keys.openpgp.org --recv 7C9E68152594688862D62AF62D9AE806EC1592E2
2022-05-23 08:54:46 +02:00
VERS=$(wget https://dl.gitea.io/gitea/version.json -q -O - | jq -r '.latest.version')
2022-03-08 19:42:28 +01:00
mkdir -p ~/gitea/
2022-05-23 08:54:46 +02:00
if [ ! -f ~/"gitea/gitea-$VERS-linux-amd64.xz" ]; then
wget "https://dl.gitea.io/gitea/$VERS/gitea-$VERS-linux-amd64.xz" -O ~/"gitea/gitea-$VERS-linux-amd64.xz"
2022-03-08 19:42:28 +01:00
fi
2022-05-23 08:54:46 +02:00
if [ ! -f ~/"gitea/gitea-$VERS-linux-amd64.xz.asc" ]; then
wget "https://dl.gitea.io/gitea/$VERS/gitea-$VERS-linux-amd64.xz.asc" -O ~/"gitea/gitea-$VERS-linux-amd64.xz.asc"
2022-03-08 19:42:28 +01:00
fi
2022-05-23 08:54:46 +02:00
gpg --verify ~/"gitea/gitea-$VERS-linux-amd64.xz.asc" ~/"gitea/gitea-$VERS-linux-amd64.xz"
2022-03-08 19:42:28 +01:00
2022-05-23 08:54:46 +02:00
cp -a ~/"gitea/gitea-$VERS-linux-amd64.xz" .
xz -d "gitea-$VERS-linux-amd64.xz"
mv "gitea-$VERS-linux-amd64" "$IMAGE_NAME_RISOTTO_IMAGE_DIR/usr/bin/gitea"
2022-03-11 18:41:49 +01:00
chmod +x "$IMAGE_NAME_RISOTTO_IMAGE_DIR/usr/bin/gitea"