Changeset 11052 for trunk/FACT++/src


Ignore:
Timestamp:
06/17/11 09:55:11 (13 years ago)
Author:
tbretz
Message:
Added --exec command
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/dimctrl.cc

    r10806 r11052  
    2222            win << kRed << "ERROR - Couldn't open log-file " << conf.Get<string>("log") << ": " << strerror(errno) << endl;
    2323
     24    if (conf.Has("exec"))
     25    {
     26        const vector<string> v = conf.Get<vector<string>>("exec");
     27        for (vector<string>::const_iterator it=v.begin(); it!=v.end(); it++)
     28            shell.Execute(*it);
     29    }
     30
    2431    shell.Run();
    2532}
     
    3643        ("log,l",     var<string>(n), "Write log-file")
    3744        ("console,c", var<int>(),     "Use console (0=shell, 1=simple buffered, X=simple unbuffered)")
     45        ("exec,e",    vars<string>(), "Execute one or more scrips at startup")
    3846        ;
    3947
     
    5866        "easily access all of their commands.\n"
    5967        "\n"
    60         "Usage: test3 [-c type] [OPTIONS]\n"
    61         "  or:  test3 [OPTIONS]\n";
     68        "Usage: dimctrl [-c type] [OPTIONS]\n"
     69        "  or:  dimctrl [OPTIONS]\n";
    6270    cout << endl;
    6371
Note: See TracChangeset for help on using the changeset viewer.