diff --git a/giteainstall b/giteainstall index cbeb199..e4045d3 100755 --- a/giteainstall +++ b/giteainstall @@ -74,17 +74,6 @@ inputcheck () { # clear -# -# Check for the latest Gitea version -# -version=$(curl -s https://dl.gitea.com/gitea/version.json | grep -oP '"version"\s*:\s*"\K[^"]+') - -# -# Use fallback if version fetch failed -# -if [[ -z "$version" ]]; then printf "Could not determine latest version. Falling back to version %s\n\n" "$fallbackversion" ; version="$fallbackversion" ; fi -printf "\nUsing Gitea version: %s\n" "$version" - # # Configure command line options # @@ -112,6 +101,17 @@ done # inputcheck "$hostname" "$dbpass" +# +# Check for the latest Gitea version +# +version=$(curl -s https://dl.gitea.com/gitea/version.json | grep -oP '"version"\s*:\s*"\K[^"]+') + +# +# Use fallback if version fetch failed +# +if [[ -z "$version" ]]; then printf "Could not determine latest version. Falling back to version %s\n\n" "$fallbackversion" ; version="$fallbackversion" ; fi +printf "\nUsing Gitea version: %s\n" "$version" + # # Download Gitea #