Esempio n. 1
0
        public void Install()
        {
            var tempFile = Path.Combine(Util.TempDir, Nupkg);

            Util.DownloadFile(DownloadUrl, tempFile);
            Moo.Install(tempFile);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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");
        }
Esempio n. 4
0
        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));
            }
        }