tools.inc 159 B

123456789101112131415
  1. warn () {
  2. echo "$(basename $0):" "$@" >&2
  3. }
  4. die () {
  5. rc=$1
  6. shift
  7. warn "$@"
  8. exit "$rc"
  9. }
  10. doc () {
  11. [[ $1 == -h ]] && { cat ; exit ; }
  12. }