Gitea: use long options

This commit is contained in:
Jeremy Gardais 2021-07-19 11:38:33 +02:00
parent 6cf7fe5977
commit 59f7e1907e
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ DEBUG=1
script_wd=$(dirname "${0}")
gitea_repo_url="https://github.com/go-gitea/gitea"
gitea_new_version=$("${script_wd}"/releasetags "${gitea_repo_url}" | grep -vE -- '(dev|rc)' | head -n1 | sed 's/v//')
gitea_new_version=$("${script_wd}"/releasetags "${gitea_repo_url}" | grep --invert-match --extended-regexp -- '(dev|rc)' | head --lines=1 | sed 's/v//')
gitea_new_version_file="/tmp/.github.gitea.upgrade"
@ -61,7 +61,7 @@ else
gitea_bin_path="gitea"
fi
gitea_current_version=$("${gitea_bin_path}" -v | cut -d' ' -f3)
gitea_current_version=$("${gitea_bin_path}" --version | cut --delimiter=' ' --fields=3)
# }}}
@ -84,7 +84,7 @@ if [ "${gitea_current_version}" != "${gitea_new_version}" ]; then
else
[ "${DEBUG}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG: Test version — The current version is up-to-date."
rm -f -- "${gitea_new_version_file}"
rm --force -- "${gitea_new_version_file}"
fi
# }}}