public void Run()
{
AutomatrLog.Log("Loaded area " + Config.Path + "... ", false);
m_Area = Area.Load(new DirectoryInfo(Config.Path));
AutomatrLog.Log("Done");
AutomatrLog.Log("Creating Client... ", false);
m_Client = new Client(m_Area);
AutomatrLog.Log("Done.");
if (!Connect())
{
AutomatrLog.Log("Connection Failed!", AutomatrLog.LogLevel.Error);
Environment.Exit(1);
}
AutomatrLog.Log("Connection successful.");
BranchStatus status = GetStatus();
AutomatrLog.Log("Branch status: " + status);
if (status == BranchStatus.Behind || Program.Options.Force)
RunTasks();
}
public static void Main(string[] args) { Options = new AutomatrOptions(); Parser parser = new Parser(new Action<ParserSettings>((ParserSettings p) => { p.CaseSensitive = false; p.IgnoreUnknownArguments = false; p.MutuallyExclusive = true; })); bool parse = parser.ParseArguments(args, Options); if (Options.Version) { AutomatrLog.Log("Automatr " + Version, AutomatrLog.LogLevel.Info); return; } AutomatrConfig config = AutomatrConfig.Load(Options.ConfigPath); Automatr automatr = new Automatr(config); automatr.Run(); }