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