Created
July 22, 2015 13:23
-
-
Save kaloyan-raev/70b59abdb4bd52b5ec14 to your computer and use it in GitHub Desktop.
PowerShell script for downloading an Eclipse update site
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
Function DownloadFile($path) { | |
$url = "http://downloads.zend.com/studio-eclipse/updates/380/" + $path | |
Write-Output "Downloading $url" | |
$output_dir = Convert-Path . | |
$output_path = Join-Path $output_dir $path | |
$start_time = Get-Date | |
$wc = New-Object System.Net.WebClient | |
$wc.DownloadFile($url, $output_path) | |
Write-Output "Finished in $((Get-Date).Subtract($start_time).Seconds) second(s)" | |
} | |
$total_start_time = Get-Date | |
DownloadFile "files.lst" | |
mkdir binary | |
mkdir features | |
mkdir plugins | |
Get-Content "files.lst" | foreach { DownloadFile $_. } | |
Write-Output "Total time: $((Get-Date).Subtract($total_start_time).Seconds) second(s)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment