From 59f7e1907ee48badfa3b3685fd90a550a842abd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Mon, 19 Jul 2021 11:38:33 +0200 Subject: [PATCH] Gitea: use long options --- github/check.gitea.update | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/github/check.gitea.update b/github/check.gitea.update index b76cd2b..9de5a50 100755 --- a/github/check.gitea.update +++ b/github/check.gitea.update @@ -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 # }}}