Author: dreimer Date: Sat Nov 29 06:42:24 2008 New Revision: 37724
URL: http://svn.reactos.org/svn/reactos?rev=37724&view=rev Log: Byebye wget.
Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/RosBE.ps1 trunk/tools/RosBE/RosBE-Windows/Powershell/update.ps1
Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/RosBE.ps1 URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershel... ============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Powershell/RosBE.ps1 [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Powershell/RosBE.ps1 [iso-8859-1] Sat Nov 29 06:42:24 2008 @@ -35,6 +35,17 @@ $global:_ROSBE_LOGDIR = "$_ROSBE_ROSSOURCEDIR\RosBE-Logs" $global:_ROSBE_OBJPATH = $null $global:_ROSBE_OUTPATH = $null + +function global:Get-WebFile { + param( + $url = $null, + $file = $null + ) + $local:ErrorActionPreference = "SilentlyContinue" + $clnt = new-object System.Net.WebClient + $clnt.DownloadFile($url,$file) + $local:ErrorActionPreference = "Continue" +}
# # Display the banner and set up the environment for the GCC 4.x.x build
Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/update.ps1 URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershel... ============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Powershell/update.ps1 [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Powershell/update.ps1 [iso-8859-1] Sat Nov 29 06:42:24 2008 @@ -27,7 +27,7 @@ return } if (!(Test-Path "$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt")) { - &"$_ROSBE_BASEDIR\Tools\wget.exe" -N --ignore-length --no-verbose $_ROSBE_URL/$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt 2>&1> $null + get-webfile $_ROSBE_URL/$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt $PWD$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt } if (Test-Path "$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt") { get-Content "$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt" @@ -36,7 +36,7 @@ $YESNO = Read-Host "(yes), (no)" if ($YESNO -eq "yes") { if (!(Test-Path "$_ROSBE_VERSION-$_ROSBE_STATCOUNT.7z")) { - &"$_ROSBE_BASEDIR\Tools\wget.exe" -N --ignore-length --no-verbose $_ROSBE_URL/$_ROSBE_VERSION-$_ROSBE_STATCOUNT.7z 2>&1> $null + get-webfile $_ROSBE_URL/$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt $PWD$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt } if (Test-Path "$_ROSBE_VERSION-$_ROSBE_STATCOUNT.7z") { remove-item "$_ROSBE_VERSION-$_ROSBE_STATCOUNT*.*" -force -EA SilentlyContinue @@ -76,7 +76,7 @@
if (!(Test-Path "$_ROSBE_BASEDIR\Tools\7z.exe")) { set-location "$_ROSBE_BASEDIR\Tools" - &"$_ROSBE_BASEDIR\Tools\wget.exe" -N --ignore-length --no-verbose $_ROSBE_URL/7z.exe 2>&1> $null + get-webfile $_ROSBE_URL/7z.exe $PWD\7z.exe set-location $_ROSBE_OPATH }
@@ -86,7 +86,7 @@ # First check for a new Updater. # rename-item update.ps1 update2.ps1 -&"$_ROSBE_BASEDIR\Tools\wget.exe" -N --ignore-length --no-verbose $_ROSBE_URL/update.ps1 2>&1> $null +get-webfile $_ROSBE_URL/update.ps1 $PWD\update.ps1 if ((gi .\update.ps1).LastWriteTime -gt (gi .\update2.ps1).LastWriteTime) { clear-host "Updater got updated and needs to be restarted." @@ -136,7 +136,7 @@ $_ROSBE_STATCOUNT = $arg2 set-location tmp if (!(Test-path "$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt")) { - &"$_ROSBE_BASEDIR\Tools\wget.exe" -N --ignore-length --no-verbose $_ROSBE_URL/$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt 2>&1> $null + get-webfile $_ROSBE_URL/$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt $PWD$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt if (Test-Path "$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt") { get-content "$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt" } else { @@ -156,7 +156,7 @@ set-location tmp while($_ROSBE_STATCOUNT -lt 10) { if (!(Test-path "$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt")) { - &"$_ROSBE_BASEDIR\Tools\wget.exe" -N --ignore-length --no-verbose $_ROSBE_URL/$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt 2>&1> $null + get-webfile $_ROSBE_URL/$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt $PWD$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt if (Test-Path "$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt") { $_ROSBE_UPDATES += "$_ROSBE_STATCOUNT " }