#!/bin/bash -u
set -u

export DIR_PIPELINE=${DIR_PIPELINE="$(cd -P "$(dirname "${BASH_SOURCE[0]}")"/../ && pwd)"}
[[ -d "$DIR_PIPELINE" ]] || { echo "FATAL: unable to determine DIR_PIPELINE! Got <$DIR_PIPELINE>." 1>&2; exit 255; }

source $DIR_PIPELINE/bin/common_odb.sh
configure_step_readonly
[[ $# -ge 1 ]] || {
    help_header_msg "usage: $0 <key>"
    echo "where <key> can be any of the below:"
    echo " .orthologer     main help         'orthologer.sh -h'"
    echo " .manage         management help   'orthologer.sh manage -h'"
    echo " .               extended help     'orthologer.sh -H .'"
    echo " .variables      user setable variables"
    echo " .steps          list of all steps"
    echo " <STEPID>        help for given step id"
    exit 0
}
arg="$1"
arg="${arg^^}"
arg5="${arg:0:5}"
[[ "$arg5" == ".ORTH" ]] && { usage; exit 0; }
[[ "$arg5" == ".MANA" ]] && { export CMD_MANAGE=manage_project.sh; source $DIR_PIPELINE/bin/manage_project.sh -h ; exit 0; }
help_xxx $1



