| | |
| | | int LicenseGenerator::generateLicense(int argc, const char **argv) { |
| | | |
| | | po::options_description visibleOptions = configureProgramOptions(); |
| | | //positional options must be addedd to standard options |
| | | //positional options must be added to standard options |
| | | po::options_description allOptions; |
| | | allOptions.add(visibleOptions).add_options()("product", |
| | | po::value<vector<string>>(), "product names"); |
| | |
| | | if (vm.count("output")) { |
| | | const std::string fname = vm["output"].as<string>(); |
| | | |
| | | fstream ofstream(fname, std::ios::out | std::ios::trunc); |
| | | fstream ofstream(fname, std::ios::out | std::ios::app); |
| | | if (!ofstream.is_open()) { |
| | | cerr << "can't open file [" << fname << "] for output." << endl |
| | | << " error: " << strerror( errno); |