Created
August 9, 2012 15:27
-
-
Save garuma/3305114 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/csharp | |
LoadAssembly ("System.Xml.Linq.dll"); | |
using System.Xml.Linq; | |
using System.IO; | |
var files = Environment.GetEnvironmentVariable ("FILES").Split ().Where (f => File.Exists (f)); | |
var mainFile = files.First (); | |
var main = XDocument.Load (mainFile); | |
foreach (var other in files.Skip (1).Select (d => XDocument.Load (d))) { | |
main.Root.Element ("Assemblies").Add (other.Root.Element ("Assemblies").Elements ()); | |
main.Root.Element ("Types").Add (other.Root.Element ("Types").Elements ()); | |
} | |
main.Save (mainFile); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment