#!/bin/sh -ve

. shell-quote

gear-cronbuild-apply-hooks
gear "$@"

commitmsg=
[ -x .gear/cronbuild-commitmsg ] && commitmsg=`.gear/cronbuild-commitmsg`
[ -n "$commitmsg" ] && commitmsg="\"$(quote_shell "$commitmsg")\""

gear-commit ${commitmsg:+-m "$commitmsg"}
