Example #1
0
int main(int argc, char* argv[])
{
    /* Initialize application path */
    SearchPaths::Setup(argv[0]);

    /* Execute all program arguments as shell commands */
    Shell shell;

    if (argc > 1)
    {
        /* Get argument stream */
        std::stringstream stream;

        for (int i = 1; i < argc; ++i)
            stream << argv[i] << std::endl;

        /* Execute argument stream */
        shell.Execute(stream);
    }
    else
        shell.Script(std::cin, true);

    return 0;
}