]> git.donarmstrong.com Git - mothur.git/blobdiff - mothur.cpp
version 1.4
[mothur.git] / mothur.cpp
index c60644d027d7fee1f1e18ce90b5a4458c411ef3b..59837dd72d7dc8dbe76ee3125052461a9e7b580a 100644 (file)
@@ -11,8 +11,6 @@
 #include "engine.hpp"
 #include "globaldata.hpp"
 
-using namespace std;
-
 /**************************************************************************************************/
 
 GlobalData* GlobalData::_uniqueInstance = 0;
@@ -24,12 +22,19 @@ int main(int argc, char *argv[]){
 
                Engine* mothur;
                bool bail = 0;
+               string input;
 
                if(argc>1){
-                       mothur = new BatchEngine(argv[1]);
+                       input = argv[1];
+
+                       if (input[0] == '#') {
+                               mothur = new ScriptEngine(argv[0], argv[1]);
+                       }else{
+                               mothur = new BatchEngine(argv[0], argv[1]);
+                       }
                }
                else{
-                       mothur = new InteractEngine();          
+                       mothur = new InteractEngine(argv[0]);           
                }
 
                while(bail == 0)                {       bail = mothur->getInput();                      }