Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

GIT_SSH variable setting on installation.

  • Loading branch information...
commit 3b722725c492ea65ef0052cbc443ee72ac13f020 1 parent 096e474
authored April 26, 2012
6  configuration.ps1
... ...
@@ -1,3 +1,3 @@
1  
-$projectsDirPath 	= #Enter projects path here
2  
-$pageantPath 	 	= #Enter Pageant path here
3  
-$pageantKeysDirPath = #Enter Pageant keys directory path here
  1
+$projectsDirPath 	= "C:\Users\Jakub\Documents\Visual Studio 2010\Projects"
  2
+$puttyDirPath	 	= "C:\Program Files (x86)\PuTTY"
  3
+$pageantKeysDirPath = "C:\Users\Jakub\.ssh"
11  install.ps1
... ...
@@ -1,3 +1,4 @@
  1
+. .\configuration.ps1
1 2
 . .\scriptsUtils.ps1
2 3
 
3 4
 $script:powerShellDir     	  = Split-Path $PROFILE
@@ -128,6 +129,15 @@ Start-Pageant
128 129
 	Write-Host "Poweshell module configured."
129 130
 }
130 131
 
  132
+function script:Set-GitSSHVariable() {
  133
+	Write-Host "Setting GIT_SSH environment variable..."
  134
+	
  135
+	$plinkPath = "$puttyDirPath\plink.exe"
  136
+	[Environment]::SetEnvironmentVariable("GIT_SSH", $plinkPath, "User")
  137
+	
  138
+	Write-Host "GIT_SSH variable set to $plinkPath."
  139
+}
  140
+
131 141
 function script:Stop-Installation() {
132 142
 	Write-Host "Installation ended."
133 143
 	Write-Host
@@ -143,4 +153,5 @@ Invoke-InstallationStep("Invoke-PoshGitInstallation")
143 153
 Invoke-InstallationStep("Copy-Files")
144 154
 Invoke-InstallationStep("Create-PowerShellProfile")
145 155
 Invoke-InstallationStep("Set-Configuration")
  156
+Invoke-InstallationStep("Set-GitSSHVariable")
146 157
 Invoke-InstallationStep("Stop-Installation")
2  pageantLoader.ps1
... ...
@@ -1,4 +1,6 @@
1 1
 function Start-Pageant {
  2
+	$pageantPath = $puttyDirPath + "\pageant.exe"
  3
+
2 4
 	if (!(Test-Path $pageantPath)) {
3 5
 		Write-Warning "Pageant is not installed or Pageant path is incorrect."
4 6
 		return

0 notes on commit 3b72272

Please sign in to comment.
Something went wrong with that request. Please try again.