Ejemplo n.º 1
0
        public override bool Execute(FolderInput input)
        {
            var folder = AliasCommand.AliasFolder(input.AppFolder);

            Restart(folder);
            return(true);
        }
Ejemplo n.º 2
0
        public override bool Execute(PackagesInput input)
        {
            input.AppFolder = AliasCommand.AliasFolder(input.AppFolder).ToFullPath();

            Execute(input, _system);
            return(true);
        }
Ejemplo n.º 3
0
        public override bool Execute(LinkInput input)
        {
            input.AppFolder     = AliasCommand.AliasFolder(input.AppFolder);
            input.PackageFolder = AliasCommand.AliasFolder(input.PackageFolder);


            Execute(input, new FileSystem());
            return(true);
        }
Ejemplo n.º 4
0
        public override bool Execute(IncludeWebContentInput input)
        {
            var folder = AliasCommand.AliasFolder(input.Folder);

            var manifest = new FileSystem().LoadPackageManifestFrom(folder);

            if (manifest.ContentFileSet == null)
            {
                manifest.ContentFileSet = new FileSet();
            }

            input.AppendIncludes(manifest.ContentFileSet);

            new FileSystem().PersistToFile(manifest, folder, PackageManifest.FILE);

            return(true);
        }
Ejemplo n.º 5
0
        public override bool Execute(InstallPackageInput input)
        {
            var applicationFolder = AliasCommand.AliasFolder(input.AppFolder);

            var packageFolder = FileSystem.Combine(applicationFolder, "bin", FubuMvcPackageFacility.FubuPackagesFolder);

            var destinationFileName = FileSystem.Combine(packageFolder, Path.GetFileName(input.PackageFile));

            if (input.UninstallFlag)
            {
                if (File.Exists(destinationFileName))
                {
                    Console.WriteLine("Deleting existing file " + destinationFileName);
                    File.Delete(destinationFileName);
                }
                else
                {
                    Console.WriteLine("File {0} does not exist", destinationFileName);
                }


                return(true);
            }

            if (!Directory.Exists(packageFolder))
            {
                Console.WriteLine("Creating folder " + packageFolder);
                Directory.CreateDirectory(packageFolder);
            }


            if (File.Exists(destinationFileName))
            {
                Console.WriteLine("Deleting existing file at " + destinationFileName);
                File.Delete(destinationFileName);
            }

            Console.WriteLine("Copying {0} to {1}", input.PackageFile, packageFolder);

            File.Copy(input.PackageFile, destinationFileName);
            return(true);
        }
Ejemplo n.º 6
0
 public override bool Execute(ManifestInput input)
 {
     input.AppFolder = AliasCommand.AliasFolder(input.AppFolder);
     return(Execute(input, new FileSystem()));
 }
Ejemplo n.º 7
0
 public override bool Execute(InstallInput input)
 {
     input.AppFolder = AliasCommand.AliasFolder(input.AppFolder);
     Execute(input, new FileSystem());
     return(true);
 }