version/vars.do: avoid infinite loop if the tag string is " master"

(ie. with an extra space)
This commit is contained in:
Henry Gebhardt 2011-02-15 15:12:53 -08:00 committed by Avery Pennarun
commit 6508cc0a63

View file

@ -17,9 +17,10 @@ names_to_tag()
x=${x%\)} x=${x%\)}
cur= cur=
while [ "$cur" != "$x" ]; do while [ "$cur" != "$x" ]; do
x=${x# }
cur=${x%%,*} cur=${x%%,*}
cur=${cur#tag: } cur=${cur#tag: }
cur=${cur## } cur=${cur# }
tagpost=${cur#$PROD-} tagpost=${cur#$PROD-}
if [ "$cur" != "$tagpost" ]; then if [ "$cur" != "$tagpost" ]; then
echo "$tagpost" echo "$tagpost"