]> git.donarmstrong.com Git - mothur.git/blobdiff - setdircommand.cpp
changing command name classify.shared to classifyrf.shared
[mothur.git] / setdircommand.cpp
index 3e50f4a508d2608ef1b51b9445fd3a388d1f4dec..42e49a1be039ce16f6ea412ca8b9de15fea106f1 100644 (file)
@@ -121,67 +121,67 @@ int SetDirectoryCommand::execute(){
                
                if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
-        if (debugOnly) { return 0; }
-        
-               commandFactory = CommandFactory::getInstance();
-               
-               m->mothurOut("Mothur's directories:"); m->mothurOutEndLine();
-               
-               //redirect output
-               if ((output == "clear") || (output == "")) {  output = "";  commandFactory->setOutputDirectory(output);  }
-               else if (output == "default") { 
-                       string exepath = m->argv;
-                       output = exepath.substr(0, (exepath.find_last_of('m')));
-                       
-                       m->mothurOut("outputDir=" + output); m->mothurOutEndLine();  
-                       commandFactory->setOutputDirectory(output);
-               }else {
-            if (m->dirCheck(output)) {
-                m->mothurOut("outputDir=" + output); m->mothurOutEndLine();  
-                               commandFactory->setOutputDirectory(output);
+        if (debugOnly) {  }
+        else {
+            commandFactory = CommandFactory::getInstance();
+            
+            m->mothurOut("Mothur's directories:"); m->mothurOutEndLine();
+            
+            //redirect output
+            if ((output == "clear") || (output == "")) {  output = "";  commandFactory->setOutputDirectory(output);  }
+            else if (output == "default") {
+                string exepath = m->argv;
+                output = exepath.substr(0, (exepath.find_last_of('m')));
+                
+                m->mothurOut("outputDir=" + output); m->mothurOutEndLine();
+                commandFactory->setOutputDirectory(output);
+            }else {
+                if (m->dirCheck(output)) {
+                    m->mothurOut("outputDir=" + output); m->mothurOutEndLine();
+                    commandFactory->setOutputDirectory(output);
+                }
             }
-               }
-               
-               //redirect input
-               if ((input == "clear") || (input == "")) {  input = "";  commandFactory->setInputDirectory(input);  }
-               else if (input == "default") { 
-                       string exepath = m->argv;
-                       input = exepath.substr(0, (exepath.find_last_of('m')));
-                       
-                       m->mothurOut("inputDir=" + input); m->mothurOutEndLine();  
-                       commandFactory->setInputDirectory(input);
-               }else {
-            if (m->dirCheck(input)) {
-                m->mothurOut("inputDir=" + input); m->mothurOutEndLine();  
-                               commandFactory->setInputDirectory(input); 
+            
+            //redirect input
+            if ((input == "clear") || (input == "")) {  input = "";  commandFactory->setInputDirectory(input);  }
+            else if (input == "default") {
+                string exepath = m->argv;
+                input = exepath.substr(0, (exepath.find_last_of('m')));
+                
+                m->mothurOut("inputDir=" + input); m->mothurOutEndLine();
+                commandFactory->setInputDirectory(input);
+            }else {
+                if (m->dirCheck(input)) {
+                    m->mothurOut("inputDir=" + input); m->mothurOutEndLine();
+                    commandFactory->setInputDirectory(input);
+                }
             }
-        }
-               
-               //set default
-               if (tempdefault == "clear") {  
-                       #ifdef MOTHUR_FILES
-                               string temp = MOTHUR_FILES; 
-                               m->mothurOut("tempDefault=" + temp); m->mothurOutEndLine();  
+            
+            //set default
+            if (tempdefault == "clear") {
+#ifdef MOTHUR_FILES
+                               string temp = MOTHUR_FILES;
+                               m->mothurOut("tempDefault=" + temp); m->mothurOutEndLine();
                                m->setDefaultPath(temp);
-                       #else
-                               string temp = ""; 
-                               m->mothurOut("No default directory defined at compile time."); m->mothurOutEndLine();  
+#else
+                               string temp = "";
+                               m->mothurOut("No default directory defined at compile time."); m->mothurOutEndLine();
                                m->setDefaultPath(temp);
-                       #endif
-               }else if (tempdefault == "") {  //do nothing
-               }else if (tempdefault == "default") { 
-                       string exepath = m->argv;
-                       tempdefault = exepath.substr(0, (exepath.find_last_of('m')));
-                       
-                       m->mothurOut("tempDefault=" + tempdefault); m->mothurOutEndLine();  
-                       m->setDefaultPath(tempdefault);
-               }else {
-            if (m->dirCheck(tempdefault)) {
+#endif
+            }else if (tempdefault == "") {  //do nothing
+            }else if (tempdefault == "default") {
+                string exepath = m->argv;
+                tempdefault = exepath.substr(0, (exepath.find_last_of('m')));
+                
                 m->mothurOut("tempDefault=" + tempdefault); m->mothurOutEndLine();  
-                               m->setDefaultPath(tempdefault); 
+                m->setDefaultPath(tempdefault);
+            }else {
+                if (m->dirCheck(tempdefault)) {
+                    m->mothurOut("tempDefault=" + tempdefault); m->mothurOutEndLine();  
+                    m->setDefaultPath(tempdefault); 
+                }
             }
         }
-
                return 0;
        }
        catch(exception& e) {