fetcher: create .ssh if it's not there

This commit is contained in:
Hylke Bons 2011-06-14 14:48:18 +01:00
parent 593d327660
commit 1f0d0c9da9
2 changed files with 25 additions and 0 deletions

View file

@ -121,10 +121,15 @@ namespace SparkleLib {
path = Environment.ExpandEnvironmentVariables ("%HOMEDRIVE%%HOMEPATH%");
}
string ssh_config_path = Path.Combine (path, ".ssh");
string ssh_config_file_path = SparkleHelpers.CombineMore (path, ".ssh", "config");
string ssh_config = Environment.NewLine + "Host " + host +
Environment.NewLine + "\tStrictHostKeyChecking no";
if (!Directory.Exists (ssh_config_path))
Directory.CreateDirectory (ssh_config_path);
if (File.Exists (ssh_config_file_path)) {
TextWriter writer = File.AppendText (ssh_config_file_path);
writer.WriteLine (ssh_config);

20
SparkleLib/SparkleLib.sln Normal file
View file

@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SparkleLib", "SparkleLib.csproj", "{2C914413-B31C-4362-93C7-1AE34F09112A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2C914413-B31C-4362-93C7-1AE34F09112A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2C914413-B31C-4362-93C7-1AE34F09112A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2C914413-B31C-4362-93C7-1AE34F09112A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2C914413-B31C-4362-93C7-1AE34F09112A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = SparkleLib.csproj
EndGlobalSection
EndGlobal