public void Install() { var tempFile = Path.Combine(Util.TempDir, Nupkg); Util.DownloadFile(DownloadUrl, tempFile); Moo.Install(tempFile); }
public static void RemoveSource(string path) { Moo.InitializeMooDir(); var sourcePaths = GetSources().Select(source => source.Path).ToList(); sourcePaths.Remove(path); var sourceContent = string.Join("\n", sourcePaths.ToArray()) + "\n"; Util.WriteFile(Moo.SourceFile, sourceContent); }
public static void AddSource(string path) { Moo.InitializeMooDir(); // if the SourceFile doesn't exist yet, // write all existing sources to the file if (!File.Exists(Moo.SourceFile)) { foreach (var source in Moo.Sources) { Util.AppendToFile(Moo.SourceFile, source.Path + "\n"); } } Util.AppendToFile(Moo.SourceFile, path + "\n"); }
public static object CommandRunnerFilter(string[] args, CommandFilter filter) { if (Moo.Verbose) { Moo.Log.Debug("CommandRunnerFilter({0})", string.Join(", ", args)); } // If, by the time we make it to this CommandRunnerFilter, all of the arguments // have been removed ... display the splash screen. Else FindAndRunCommand. if (args.Length == 0) { return(SplashScreenFilter(args, null)); } else { return(Moo.FindAndRunCommand(args)); } }