cmd/update: use short option in update.sh

Support the environment not supporting long option, such as Alpine Linux
with busybox.
This commit is contained in:
chirsz 2025-07-28 18:53:10 +00:00
parent d2eb9c4c21
commit 75b1e681b8

View File

@ -211,9 +211,8 @@ merge_or_rebase() {
if [[ "${DIR}" == "${HOMEBREW_REPOSITORY}" && -n "${HOMEBREW_UPDATE_TO_TAG}" ]] if [[ "${DIR}" == "${HOMEBREW_REPOSITORY}" && -n "${HOMEBREW_UPDATE_TO_TAG}" ]]
then then
UPSTREAM_TAG="$( UPSTREAM_TAG="$(
git tag --list | git tag --list --sort=-version:refname |
sort --field-separator=. --key=1,1nr -k 2,2nr -k 3,3nr | grep -m 1 '^[0-9]*\.[0-9]*\.[0-9]*$'
grep --max-count=1 '^[0-9]*\.[0-9]*\.[0-9]*$'
)" )"
else else
UPSTREAM_TAG="" UPSTREAM_TAG=""