Skip to content

Instantly share code, notes, and snippets.

@warnergodfrey
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save warnergodfrey/b92a81e70970d638b926 to your computer and use it in GitHub Desktop.
Save warnergodfrey/b92a81e70970d638b926 to your computer and use it in GitHub Desktop.
SEEK Development Authoring Environment
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