diff --git a/sunrise-commit b/sunrise-commit index 8dc303b..1396f94 100755 --- a/sunrise-commit +++ b/sunrise-commit @@ -102,6 +102,20 @@ vcs_status() { fi } +print_help() { + cat <<_EOH_ +Synopsis: + sunrise-commit [options] [--] + +Options: + -?, -h, --help print this message, + -V, --version print version string, + + -c, --changelog backwards compat (ignored), + -v, --verbose enable verbose output. +_EOH_ +} + # Guess what! main() { local commitmsg @@ -109,9 +123,22 @@ main() { while [ ${#} -gt 0 ]; do case "${1}" in + --help|-?|-h) + print_help + exit 0 + ;; + --version|-V) + echo 'sunrise-commit 1.0' + exit 0 + ;; + + -c|--changelog) + # Now changelog entries are implicit -- backwards compat. + ;; -v|--verbose) SC_VERBOSE=1 ;; + --) shift commitmsg="${commitmsg+${commitmsg} }${@}"