Last active
August 29, 2015 14:23
SEEK Development Authoring Environment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Disable-UAC | |
choco install -y vagrant | |
choco install -y git -params "/GitAndUnixToolsOnPath /NoAutoCrlf" | |
choco install -y python3 -version 3.3.5 | |
# install Windows port of git-repo | |
$gitRepoPath = "C:\tools\git-repo" | |
if (-not (Test-Path $gitRepoPath)) { | |
New-Item -Type d -Path $gitRepoPath | |
} | |
Invoke-WebRequest -Uri https://raw.githubusercontent.com/esrlabs/git-repo/master/repo -OutFile "$gitRepoPath\repo" | |
Invoke-WebRequest -Uri https://raw.githubusercontent.com/esrlabs/git-repo/master/repo.cmd -OutFile "$gitRepoPath\repo.cmd" | |
# add git-repo to path | |
$existingPathEntries = [Environment]::GetEnvironmentVariable('PATH','Machine') -Split ';' | Where-Object {$_ -ne ''} | |
if ($existingPathEntries -NotContains $gitRepoPath) { | |
$updatedPath = ($existingPathEntries + $gitRepoPath) -join ';' | |
[Environment]::SetEnvironmentVariable('PATH',$updatedPath,'Machine') | |
} | |
# move open SSH to end of the path, so its sh.exe isn't preferred over git's sh.exe | |
$existingPathEntries = [Environment]::GetEnvironmentVariable('PATH','Machine') -Split ';' | Where-Object {$_ -ne ''} | |
$openSshPath = 'C:\Program Files\OpenSSH\bin' | |
if ($existingPathEntries -Contains $openSshPath) { | |
$nonSshPathEntries = $existingPathEntries | Where-Object {$_ -ne $openSshPath} | |
$updatedPath = ($nonSshPathEntries + $openSshPath) -join ';' | |
[Environment]::SetEnvironmentVariable("PATH",$updatedPath,"Machine") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment