From 9ab458e8581a1bdace1c51b77b0c4b8b7c703eac Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Mon, 23 May 2022 08:54:46 +0200 Subject: [PATCH] do not override VERSION --- .../gitea/manual/image/postinstall/gitea.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/seed/applicationservice/2022.03.08/gitea/manual/image/postinstall/gitea.sh b/seed/applicationservice/2022.03.08/gitea/manual/image/postinstall/gitea.sh index 8de3db79..3526c534 100644 --- a/seed/applicationservice/2022.03.08/gitea/manual/image/postinstall/gitea.sh +++ b/seed/applicationservice/2022.03.08/gitea/manual/image/postinstall/gitea.sh @@ -4,20 +4,20 @@ set -ex gpg --keyserver keys.openpgp.org --recv 7C9E68152594688862D62AF62D9AE806EC1592E2 -VERSION=$(wget https://dl.gitea.io/gitea/version.json -q -O - | jq -r '.latest.version') +VERS=$(wget https://dl.gitea.io/gitea/version.json -q -O - | jq -r '.latest.version') mkdir -p ~/gitea/ -if [ ! -f ~/"gitea/gitea-$VERSION-linux-amd64.xz" ]; then - wget "https://dl.gitea.io/gitea/$VERSION/gitea-$VERSION-linux-amd64.xz" -O ~/"gitea/gitea-$VERSION-linux-amd64.xz" +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" fi -if [ ! -f ~/"gitea/gitea-$VERSION-linux-amd64.xz.asc" ]; then - wget "https://dl.gitea.io/gitea/$VERSION/gitea-$VERSION-linux-amd64.xz.asc" -O ~/"gitea/gitea-$VERSION-linux-amd64.xz.asc" +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" fi -gpg --verify ~/"gitea/gitea-$VERSION-linux-amd64.xz.asc" ~/"gitea/gitea-$VERSION-linux-amd64.xz" +gpg --verify ~/"gitea/gitea-$VERS-linux-amd64.xz.asc" ~/"gitea/gitea-$VERS-linux-amd64.xz" -cp -a ~/"gitea/gitea-$VERSION-linux-amd64.xz" . -xz -d "gitea-$VERSION-linux-amd64.xz" -mv "gitea-$VERSION-linux-amd64" "$IMAGE_NAME_RISOTTO_IMAGE_DIR/usr/bin/gitea" +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" chmod +x "$IMAGE_NAME_RISOTTO_IMAGE_DIR/usr/bin/gitea"