//break apart path variable by ':'
vector<string> dirs;
- splitAtChar(envPath, dirs, delim);
+ mout->splitAtChar(envPath, dirs, delim);
//get path related to mothur
string mothurPath = "";
try {
globaldata = GlobalData::getInstance();
- openedBatch = openInputFile(batchFileName, inputBatchFile);
+ openedBatch = mout->openInputFile(batchFileName, inputBatchFile);
string temppath = path.substr(0, (path.find_last_of('m')));
//break apart path variable by ':'
vector<string> dirs;
- splitAtChar(envPath, dirs, delim);
+ mout->splitAtChar(envPath, dirs, delim);
//get path related to mothur
string mothurPath = "";
}
}
- gobble(inputBatchFile);
+ mout->gobble(inputBatchFile);
}
inputBatchFile.close();
string nextcommand = "";
if (inputBatchFile.eof()) { nextcommand = "quit()"; }
- else { nextcommand = getline(inputBatchFile); }
+ else { nextcommand = mout->getline(inputBatchFile); }
return nextcommand;
}
//break apart path variable by ':'
vector<string> dirs;
- splitAtChar(envPath, dirs, delim);
+ mout->splitAtChar(envPath, dirs, delim);
//get path related to mothur
string mothurPath = "";
string nextcommand = "";
int count = 0;
+ bool ignoreSemiColons = false;
//go through string until you reach ; or end
while (count < commandString.length()) {
- if (commandString[count] == ';') { break; }
+ //you want to ignore any ; until you reach the next '
+ if ((commandString[count] == '\'') && (!ignoreSemiColons)) { ignoreSemiColons = true; }
+ else if ((commandString[count] == '\'') && (ignoreSemiColons)) { ignoreSemiColons = false; }
+
+ if ((commandString[count] == ';') && (!ignoreSemiColons)) { break; }
else { nextcommand += commandString[count]; }
count++;