#!/bin/bash -euE . pbs-plumb-shlib cmd=${0##*/} usage() { echo "Usage: $cmd [git-commit OPTIONS]" echo 'Commits to a package (run from the package directory).' echo '' echo 'This is like `git commit`, but cascades up out of the submodule.' echo 'It is simply:' echo echo ' git commit "$@"' echo ' pbs-package-postcommit' echo '' echo 'Options:' echo ' -h Show this message' echo '' echo ' ====================== `git commit` usage ======================' echo '' git commit -h } main() { if in_array '-h' "$@"; then usage return 0 fi ensure_in_pbs-package git commit "$@" pbs-package-postcommit } main "$@"