utils-template.sh 498 B

12345678910
  1. # include my helper funcs or define simple versions inline
  2. if [ -f $HOME/lib/bash/bashutils.sh ]; then
  3. source $HOME/lib/bash/bashutils.sh
  4. else
  5. function info() { echo `date +%c` \: info: "$@" 1>&2; }
  6. function warn() { echo `date +%c` \: warning: "$@" 1>&2; }
  7. function error() { echo `date +%c` \: error: "$@" 1>&2; }
  8. function debug() { [[ -v DEBUG ]] && echo `date +%c` \: debug: "$@" 1>&2 || true ; }
  9. function die() { echo `date +%c` \: fatal: "$@" 1>&2 && exit 1; }
  10. fi