]> git.donarmstrong.com Git - mothur.git/blobdiff - mothur.cpp
working on sffinfo command.
[mothur.git] / mothur.cpp
index 2d35c698cdb8bbcbb9a910a7b4c5e96f3fbd42f5..1e5b41bd7ca20879113e604dac03e9ffd7e6ab36 100644 (file)
@@ -58,7 +58,7 @@ int main(int argc, char *argv[]){
                                m->mothurOutEndLine(); m->mothurOutEndLine();\r
                        #else\r
                                m->mothurOutJustToLog("Linux version");\r
-                               >m->mothurOutEndLine(); m->mothurOutEndLine();\r
+                               m->mothurOutEndLine(); m->mothurOutEndLine();\r
                        #endif\r
 \r
                #else\r
@@ -72,10 +72,18 @@ int main(int argc, char *argv[]){
                        m->mothurOutEndLine(); m->mothurOutEndLine();\r
                #endif\r
                \r
+               #ifdef BIT_VERSION\r
+                       m->mothurOutJustToLog("Running 64Bit Version");\r
+                       m->mothurOutEndLine(); m->mothurOutEndLine();\r
+               #else\r
+                       m->mothurOutJustToLog("Running 32Bit Version");\r
+                       m->mothurOutEndLine(); m->mothurOutEndLine();\r
+               #endif\r
+               \r
                //header\r
-               m->mothurOut("mothur v.1.9");\r
+               m->mothurOut("mothur v.1.11.0");\r
                m->mothurOutEndLine();          \r
-               m->mothurOut("Last updated: 4/16/2010");\r
+               m->mothurOut("Last updated: 6/18/2010");\r
                m->mothurOutEndLine();  \r
                m->mothurOutEndLine();          \r
                m->mothurOut("by");\r
@@ -144,15 +152,37 @@ int main(int argc, char *argv[]){
                \r
                while(bail == 0)        {       bail = mothur->getInput();      }\r
                \r
-               string outputDir = mothur->getOutputDir();\r
-               string newlogFileName = outputDir + logFileName;\r
-               \r
                //closes logfile so we can rename\r
                m->closeLog();\r
-       \r
-               //need this because m->mothurOut makes the logfile, but doesn't know where to put it\r
-               rename(logFileName.c_str(), newlogFileName.c_str()); //logfile with timestamp\r
                \r
+               string outputDir = mothur->getOutputDir();\r
+               string tempLog = mothur->getLogFileName();\r
+               bool append = mothur->getAppend();\r
+               \r
+               string newlogFileName;\r
+               if (tempLog != "") {\r
+                       newlogFileName = outputDir + tempLog;\r
+                       \r
+                       if (!append) {  \r
+                               //need this because m->mothurOut makes the logfile, but doesn't know where to put it\r
+                               rename(logFileName.c_str(), newlogFileName.c_str()); //logfile with timestamp\r
+\r
+                       }else {\r
+                               ofstream outNewLog;\r
+                               openOutputFileAppend(newlogFileName, outNewLog);\r
+                               outNewLog << endl << endl << "*********************************************************************************" << endl << endl;\r
+                               outNewLog.close();\r
+                               \r
+                               appendFiles(logFileName, newlogFileName);\r
+                               remove(logFileName.c_str());\r
+                       }\r
+               }else{  \r
+                       newlogFileName = outputDir + logFileName;\r
+                       //need this because m->mothurOut makes the logfile, but doesn't know where to put it\r
+                       rename(logFileName.c_str(), newlogFileName.c_str()); //logfile with timestamp\r
+               }\r
+               \r
+                               \r
                delete mothur;\r
                \r
                #ifdef USE_MPI\r