# check if a program exists.
exists() {
  if command -v true; then
    command -v -- "${1:?}"
  elif eval type type; then
    eval type -- "${1:?}"
  fi >/dev/null 2>&1
}
