#!/usr/bin/env bash
# shellcheck source=scripts/functions
source "$(dirname "${0}")"/../functions
echo
doLogo
echo
# shellcheck disable=SC2007,SC2154
echo "Current version of devon-scripts is 3.0.0-beta24"
echo
if [ -z "${1}" ]
then
  echo "usage: devon [command [args]]"
  echo "Setup devonfw IDE environment and optionally lauch commands."
  echo 
  echo "Commands:"
  for command in "${DEVON_IDE_HOME}/scripts/command/"*
  do
    echo " $(basename "${command}")"
  done
  echo
  echo "For further details use:"
  echo "devon help <command>"
else
  echo "usage: devon ${1} [options] [args]"
  echo
  if [ "${1}" = "help" ]
  then
    echo "devon help <command>"
    echo "Print help for <command>"
  else
    doDevonCommand "${1}" help
    echo " -b | --batch         run in non-interactive mode (do not ask any questions)."
    echo " -q | --quiet         be quiet and avoid output."
    echo " -f | --force         force proceeding even in case of warnings."
  fi
fi
