forked from Mirrors/freeswitch
[Build-System] Improve build time on Windows: Do not download a pre-compiled binary if it's found in a folder pointed by the FreeSWITCHBuildCachePath environment variable.
This commit is contained in:
parent
62d3e52cf9
commit
4454ea58fd
|
@ -100,7 +100,14 @@ using System.Diagnostics;
|
|||
Uri uri = new Uri(package);
|
||||
string urifilename = Path.GetFileName(uri.LocalPath);
|
||||
string output = Path.Combine(outputfolder ?? librarypath, (outputfilename ?? urifilename));
|
||||
string cachedir = Environment.GetEnvironmentVariable("FreeSWITCHBuildCachePath") ?? "";
|
||||
string cached_file = cachedir != "" ? Path.Combine(cachedir, (outputfilename ?? urifilename)) : "";
|
||||
|
||||
if (cached_file != "" && File.Exists(cached_file)) {
|
||||
Log.LogMessage(MessageImportance.High,
|
||||
"Found package in cache \"" + cached_file + "\".");
|
||||
File.Copy(cached_file, output);
|
||||
} else
|
||||
//if (!File.Exists(output)) // Uncomment to skip download if exists
|
||||
{
|
||||
var syncObject = new State
|
||||
|
|
Loading…
Reference in New Issue