# shellcheck shell=dash

___x_cmd log init solo

xrc:mod:lib     solo        engine/_index   \
    detect parse   util init reinit  run  clean

___x_cmd_solo___main(){
    [ "$#" -gt 0 ]  ||      set -- --help

    local op="$1";          shift
    case "$op" in
        -h|--help)          ___x_cmd help -m solo ;;

        cd|which|which_|\
        parse|parse_|detect|trymake|\
        clean|reinit|\
        init|make|run)
                            "___x_cmd_solo___${op#--}"      "$@" ;;

        engine)             ___x_cmd_solo_engine            "$@" ;;

        --)                 ___x_cmd_solo___run             "$@" ;;
        *)                  ___x_cmd_solo___run "$op"       "$@" ;;
    esac
}

___x_cmd_solo___isoutdated(){
    local absfp="$1"
    local wsfp="$2"
    [ ! -f "${wsfp}" ] || [ "${absfp}" -nt "${wsfp}" ]
}
