]> Creatis software - creaImageIO.git/blobdiff - appli/gimmick/main.cxx
Added functionality of timestamp and maintenance databases when using multiple sources
[creaImageIO.git] / appli / gimmick / main.cxx
index b456e3f48a4b232e3c2f29d36d6f139a13be0849..ab08f622a10ec27ea2bcfb5816233eb8531bf878 100644 (file)
@@ -27,7 +27,7 @@ int main(int ac, char* av[])
     ("print,p","Prints the local database tree  (default=off)")
     ("file,f",po::value< vector<string> >(),"Adds the file to the local database")
     ("dir,d",po::value< vector<string> >(),"Adds the directory to the local database")
-    ("sync,s","Synchronizes the local database with the files")
+    ("sync,s",po::value< vector<string> >(),"Synchronizes the local database with the files")
     ("recurse,r","Recurse into sub-directories  (default=off)")
        ("repair,R","Repair the database (on synchronization) (default=off)")
        ("check,c","Check for attribute differences (on synchronization) (default=off)");
@@ -97,13 +97,14 @@ int main(int ac, char* av[])
        if (vm.count("sync")) {
          bool rep=false;
       bool chk=false;
+         std::vector<std::string> name=vm["sync"].as< vector<string> >();
          std::stringstream out;
          out<<vm.count("repair");
          if(out.str().compare("1")==0){rep=true;}
          std::stringstream out2;
          out2<<vm.count("check");
          if(out2.str().compare("1")==0){chk=true;}
-         cout<<g.Synchronize(rep,chk)<<"\n";
+         cout<<g.Synchronize(name.front(),rep,chk)<<"\n";
        }       
        g.Finalize();
       }