#!/usr/bin/env bash

boilerplate=$( command -v boilerplate.sh ) \
  && . "$boilerplate" && unset boilerplate \
  || { echo "fatal: could not locate boilerplate.sh" && exit 1; }
boilerplate "$@";

process.use strict;

require opts/help;
help.man.page alias rlx-alias.3;
help.man.page attach rlx-attach.3;
help.man.page auth rlx-auth.3;
help.man.page bulk rlx-bulk.3;
help.man.page config rlx-config.3;
help.man.page db rlx-db.3;
help.man.page debug rlx-debug.3;
help.man.page default rlx.1;
help.man.page design rlx-design.3;
help.man.page doc rlx-doc.3;
help.man.page external rlx-external.3;
help.man.page page rlx-page.3;
help.man.page repl rlx-repl.3;
help.man.page server rlx-server.3;
help.man.page settings rlx-settings.3;
help.man.page tpl rlx-tpl.3;
help.parse "$@";

require opts/version;
version.parse "$@";

require db/couchdb;
require rlx;

rlx "$@";
