diff options
Diffstat (limited to '')
-rw-r--r-- | Prebuild/src/Core/Nodes/MatchNode.cs | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/Prebuild/src/Core/Nodes/MatchNode.cs b/Prebuild/src/Core/Nodes/MatchNode.cs index 9735265..000bde9 100644 --- a/Prebuild/src/Core/Nodes/MatchNode.cs +++ b/Prebuild/src/Core/Nodes/MatchNode.cs | |||
@@ -52,6 +52,7 @@ namespace Prebuild.Core.Nodes | |||
52 | private bool m_Link; | 52 | private bool m_Link; |
53 | private string m_LinkPath; | 53 | private string m_LinkPath; |
54 | private bool m_PreservePath; | 54 | private bool m_PreservePath; |
55 | private string m_Destination = ""; | ||
55 | private readonly List<ExcludeNode> m_Exclusions = new List<ExcludeNode>(); | 56 | private readonly List<ExcludeNode> m_Exclusions = new List<ExcludeNode>(); |
56 | 57 | ||
57 | #endregion | 58 | #endregion |
@@ -80,6 +81,13 @@ namespace Prebuild.Core.Nodes | |||
80 | } | 81 | } |
81 | } | 82 | } |
82 | 83 | ||
84 | public string DestinationPath | ||
85 | { | ||
86 | get | ||
87 | { | ||
88 | return m_Destination; | ||
89 | } | ||
90 | } | ||
83 | /// <summary> | 91 | /// <summary> |
84 | /// | 92 | /// |
85 | /// </summary> | 93 | /// </summary> |
@@ -285,12 +293,14 @@ namespace Prebuild.Core.Nodes | |||
285 | } | 293 | } |
286 | string path = Helper.AttributeValue(node, "path", "."); | 294 | string path = Helper.AttributeValue(node, "path", "."); |
287 | string pattern = Helper.AttributeValue(node, "pattern", "*"); | 295 | string pattern = Helper.AttributeValue(node, "pattern", "*"); |
296 | string destination = Helper.AttributeValue(node, "destination", string.Empty); | ||
288 | bool recurse = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "recurse", "false")); | 297 | bool recurse = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "recurse", "false")); |
289 | bool useRegex = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "useRegex", "false")); | 298 | bool useRegex = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "useRegex", "false")); |
290 | string buildAction = Helper.AttributeValue(node, "buildAction", String.Empty); | 299 | string buildAction = Helper.AttributeValue(node, "buildAction", String.Empty); |
291 | if (buildAction != string.Empty) | 300 | if (buildAction != string.Empty) |
292 | m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction), buildAction); | 301 | m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction), buildAction); |
293 | 302 | ||
303 | |||
294 | //TODO: Figure out where the subtype node is being assigned | 304 | //TODO: Figure out where the subtype node is being assigned |
295 | //string subType = Helper.AttributeValue(node, "subType", string.Empty); | 305 | //string subType = Helper.AttributeValue(node, "subType", string.Empty); |
296 | //if (subType != String.Empty) | 306 | //if (subType != String.Empty) |
@@ -304,11 +314,12 @@ namespace Prebuild.Core.Nodes | |||
304 | } | 314 | } |
305 | m_PreservePath = bool.Parse( Helper.AttributeValue( node, "preservePath", bool.FalseString ) ); | 315 | m_PreservePath = bool.Parse( Helper.AttributeValue( node, "preservePath", bool.FalseString ) ); |
306 | 316 | ||
317 | if ( buildAction == "Copy") | ||
318 | m_Destination = destination; | ||
307 | 319 | ||
308 | if(path != null && path.Length == 0) | 320 | if(path != null && path.Length == 0) |
309 | { | ||
310 | path = ".";//use current directory | 321 | path = ".";//use current directory |
311 | } | 322 | |
312 | //throw new WarningException("Match must have a 'path' attribute"); | 323 | //throw new WarningException("Match must have a 'path' attribute"); |
313 | 324 | ||
314 | if(pattern == null) | 325 | if(pattern == null) |