# This script updates cygwin, ssh and rsync

$cygwinInstallerUrl = "https://www.cygwin.com/setup-x86_64.exe"
$folder = "C:\AOFG"
$executable = "$folder\cygwin_env_setup.exe"
if(-not (Test-Path -Path $folder))
{ 
    New-Item -Path $folder -ItemType Directory| Out-Null 
}

(New-Object System.Net.WebClient).DownloadFile($cygwinInstallerUrl, $executable)

Start-Process -FilePath $executable -ArgumentList "--upgrade-also", "-q" -Wait
