Last active
February 3, 2020 09:22
-
-
Save tao-zhang/23b68c37bca63c67fc10cf0fe7d2886f to your computer and use it in GitHub Desktop.
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
# Download and install cygwin and some packages | |
function Install-Cygwin { | |
param ( $TempCygDir="$env:USERPROFILE\Downloads\cygInstall" ) | |
if(!(Test-Path -Path $TempCygDir -PathType Container)) | |
{ | |
$null = New-Item -Type Directory -Path $TempCygDir -Force | |
} | |
$client = new-object System.Net.WebClient | |
$client.DownloadFile("https://cygwin.com/setup-x86_64.exe", "$TempCygDir\setup.exe" ) | |
# Comma-separated list of packages you want goes at the end | |
Start-Process -wait -FilePath "$TempCygDir\setup.exe" -ArgumentList "-q -l $TempCygDir -R c:\Cygwin -P openssh, vim" | |
} | |
# then you just run it! | |
Install-Cygwin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment