public void Run(SetupContext context) { if (!context.IsChocolateyInstalled()) { string chocoInstallScript = context.DownloadString("Chocolatey install script URL", ChocoInstallScriptUrl); context.ExecutePowershell(chocoInstallScript); context.ExecuteChocolatey("feature", "enable", "-n=allowGlobalConfirmation"); } //string chocoSavePath = context.CreateSaveDir("chocolatey"); //string chocoPackagesFilePath = Path.Combine(chocoSavePath, "choco-packages.config"); //File.WriteAllText(chocoPackagesFilePath, Resources.choco_packages, Encoding.UTF8); //ExecuteChocolatey(context, ChocoExePath, "install", chocoPackagesFilePath); }
public void Run(SetupContext context) { string packagesPath = SublimePackagesPath; if (!Directory.Exists(packagesPath)) { Directory.CreateDirectory(packagesPath); } // Download git packages. foreach (string url in GitPackagesToInstallAfterwards) { string repoName = GetFileNameFromUrl(url, withExtension: false); string clonePath = Path.Combine(packagesPath, repoName); CloneGitRepository(context, GitExePath, url, clonePath); // HACK if (repoName.Trim().ToLower() == "sublimetext3settings") { context.ExecutePowershell("-File", Path.Combine(clonePath, "AddPackages.ps1")); } } }