Skip to content

Instantly share code, notes, and snippets.

@SjB
Last active October 23, 2015 16:25
Show Gist options
  • Select an option

  • Save SjB/dfc296cd49995d3926b7 to your computer and use it in GitHub Desktop.

Select an option

Save SjB/dfc296cd49995d3926b7 to your computer and use it in GitHub Desktop.
fetch an archive and extract it in the path specified
Action<string, string> FetchDependent = delegate(string file, string path) {
var dslmioLibDir = thirdPartyLibDir + Directory(path);
if (!DirectoryExists(dslmioLibDir)) {
Information(file);
var tempFile = DownloadFile(file);
Information(tempFile.ToString());
if (file.EndsWith("zip")) {
Unzip(tempFile, thirdPartyLibDir);
} else {
Tar(tempFile, thirdPartyLibDir);
}
DeleteFile(tempFile);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment