diff --git a/fd-commit b/fd-commit index e64486a1..d80f6b5d 100755 --- a/fd-commit +++ b/fd-commit @@ -60,19 +60,31 @@ while read line; do fullname="$id" fi + onlybuild=true newbuild=false while read l; do - if [[ "$l" == "+Build:"* ]]; then + if [[ "$l" == "-Build:"* ]]; then + onlybuild=false + elif [[ "$l" == "+Build:"* ]]; then + if $newbuild; then + onlybuild=false + fi newbuild=true build=${l#*:} version=${build%%,*} build=${build#*,} vercode=${build%%,*} + elif $newbuild && $onlybuild [[ "$l" == "+"*"disable="* ]]; then + disable=true fi done < <(git diff HEAD -- "$file") - if $newbuild ; then - message="Update $fullname to $version ($vercode)" + if $newbuild && $onlybuild; then + if $disable; then + message="Don't update $fullname to $version ($vercode)" + else + message="Update $fullname to $version ($vercode)" + fi else message="$fullname:" fi