- //valid paramters for this command
- string Array[] = {"command"};
- vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
-
- OptionParser parser(option);
- map<string,string> parameters = parser.getParameters();
-
- ValidParameters validParameter;
-
- //check to make sure all parameters are valid for command
- for (map<string,string>::iterator it = parameters.begin(); it != parameters.end(); it++) {
- if (validParameter.isValidParameter(it->first, myArray, it->second) != true) { abort = true; }
- }
-
- //check for required parameters
- command = validParameter.validFile(parameters, "command", false);
- if (command == "not found") { mothurOut("command is a required parameter."); mothurOutEndLine(); abort = true; }
+ if (option = "") { mothurOut("You must enter a command to run."); mothurOutEndLine(); abort = true; }
+ else { command = option; }