/// <summary>
/// Main method, pass folder name as argument.
/// </summary>
public static void Main (string[] args)
{
Utils.ConfigureLogging();
CmisSyncOnce once = new CmisSyncOnce();
// Load the specified synchronized folders, or all if none is specified.
if (args.Length > 0)
{
for (int i = 0; i < args.Length; i++)
{
once.AddSynchronizedFolder(args[i]);
}
}
else
{
Config config = ConfigManager.CurrentConfig;
foreach (CmisSync.Lib.Config.SyncConfig.Folder folder in config.Folders)
{
RepoInfo repoInfo = folder.GetRepoInfo();
once.repos.Add(repoInfo);
}
}
// Synchronize all
once.Sync();
}