Gitea: use long options
This commit is contained in:
parent
6cf7fe5977
commit
59f7e1907e
|
@ -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
|
||||
# }}}
|
||||
|
||||
|
|
Loading…
Reference in New Issue