Permalink
Browse files

GIT_SSH variable setting on installation.

  • Loading branch information...
1 parent 096e474 commit 3b722725c492ea65ef0052cbc443ee72ac13f020 unknown committed Apr 26, 2012
Showing with 16 additions and 3 deletions.
  1. +3 −3 configuration.ps1
  2. +11 −0 install.ps1
  3. +2 −0 pageantLoader.ps1
View
6 configuration.ps1
@@ -1,3 +1,3 @@
-$projectsDirPath = #Enter projects path here
-$pageantPath = #Enter Pageant path here
-$pageantKeysDirPath = #Enter Pageant keys directory path here
+$projectsDirPath = "C:\Users\Jakub\Documents\Visual Studio 2010\Projects"
+$puttyDirPath = "C:\Program Files (x86)\PuTTY"
+$pageantKeysDirPath = "C:\Users\Jakub\.ssh"
View
11 install.ps1
@@ -1,3 +1,4 @@
+. .\configuration.ps1
. .\scriptsUtils.ps1
$script:powerShellDir = Split-Path $PROFILE
@@ -128,6 +129,15 @@ Start-Pageant
Write-Host "Poweshell module configured."
}
+function script:Set-GitSSHVariable() {
+ Write-Host "Setting GIT_SSH environment variable..."
+
+ $plinkPath = "$puttyDirPath\plink.exe"
+ [Environment]::SetEnvironmentVariable("GIT_SSH", $plinkPath, "User")
+
+ Write-Host "GIT_SSH variable set to $plinkPath."
+}
+
function script:Stop-Installation() {
Write-Host "Installation ended."
Write-Host
@@ -143,4 +153,5 @@ Invoke-InstallationStep("Invoke-PoshGitInstallation")
Invoke-InstallationStep("Copy-Files")
Invoke-InstallationStep("Create-PowerShellProfile")
Invoke-InstallationStep("Set-Configuration")
+Invoke-InstallationStep("Set-GitSSHVariable")
Invoke-InstallationStep("Stop-Installation")
View
2 pageantLoader.ps1
@@ -1,4 +1,6 @@
function Start-Pageant {
+ $pageantPath = $puttyDirPath + "\pageant.exe"
+
if (!(Test-Path $pageantPath)) {
Write-Warning "Pageant is not installed or Pageant path is incorrect."
return

0 comments on commit 3b72272

Please sign in to comment.