Преглед на файлове

don't download if not needed

Oren Novotny преди 9 години
родител
ревизия
19eed96ebf
променени са 2 файла, в които са добавени 6 реда и са изтрити 3 реда
  1. 3 1
      Ix.NET/Source/build-new.ps1
  2. 3 2
      Rx.NET/Source/build-new.ps1

+ 3 - 1
Ix.NET/Source/build-new.ps1

@@ -2,7 +2,9 @@ $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition
 
 $configuration = "Release"
 
-wget "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" -outfile .\nuget.exe
+if (!(Test-Path .\nuget.exe)) {
+    wget "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" -outfile .\nuget.exe
+}
 
 $msbuild = Get-ItemProperty "hklm:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0"
 

+ 3 - 2
Rx.NET/Source/build-new.ps1

@@ -2,8 +2,9 @@ $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition
 
 $configuration = "Release"
 
-wget "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" -outfile .\nuget.exe
-
+if (!(Test-Path .\nuget.exe)) {
+    wget "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" -outfile .\nuget.exe
+}
 $msbuild = Get-ItemProperty "hklm:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0"
 
 # TODO: if not found, bail out