From 49ea4272cd51bd9eede4c438e5f684f81a9a074c Mon Sep 17 00:00:00 2001 From: Eduard Veit Date: Tue, 8 Mar 2022 19:10:37 +0100 Subject: [PATCH] move function in `gitea-update` --- uberspace-gitea-installer.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/uberspace-gitea-installer.sh b/uberspace-gitea-installer.sh index 3f18319..dacb31c 100644 --- a/uberspace-gitea-installer.sh +++ b/uberspace-gitea-installer.sh @@ -195,6 +195,20 @@ ORG=go-gitea # Organisation or GitHub user REPO=gitea GITHUB_API_URL=https://api.github.com/repos/$ORG/$REPO/releases/latest +function do_update_procedure +{ + wget --quiet --progress=bar:force --output-document $TMP_LOCATION/gitea "$DOWNLOAD_URL" + verify_file + supervisorctl stop gitea + mv --verbose $TMP_LOCATION/gitea "$GITEA_LOCATION" + chmod u+x --verbose "$GITEA_LOCATION" + echo "Start gitea migration" + $GITEA_LOCATION migrate + supervisorctl start gitea + sleep 5 + supervisorctl status gitea +} + function get_local_version { LOCAL_VERSION=$($GITEA_LOCATION --version | @@ -237,20 +251,6 @@ function verify_file fi } -function do_update_procedure -{ - wget --quiet --progress=bar:force --output-document $TMP_LOCATION/gitea "$DOWNLOAD_URL" - verify_file - supervisorctl stop gitea - mv --verbose $TMP_LOCATION/gitea "$GITEA_LOCATION" - chmod u+x --verbose "$GITEA_LOCATION" - echo "Start gitea migration" - $GITEA_LOCATION migrate - supervisorctl start gitea - sleep 5 - supervisorctl status gitea -} - ## this is a helper function to compare two versions as a "lower than" operator function version_lt {