ubuntu: support target-dir for resource-file

Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/22b67eb2
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/22b67eb2
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/22b67eb2

Branch: refs/heads/master
Commit: 22b67eb2a6ab04d8e4d65c7c9a291ec35ed13840
Parents: cc76870
Author: Maxim Ermilov <[email protected]>
Authored: Tue Aug 19 15:10:17 2014 +0400
Committer: Andrew Grieve <[email protected]>
Committed: Wed Aug 20 10:41:18 2014 -0400

----------------------------------------------------------------------
 cordova-lib/src/plugman/platforms/ubuntu.js | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/22b67eb2/cordova-lib/src/plugman/platforms/ubuntu.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/ubuntu.js 
b/cordova-lib/src/plugman/platforms/ubuntu.js
index 89e0ed8..4fd01f2 100644
--- a/cordova-lib/src/plugman/platforms/ubuntu.js
+++ b/cordova-lib/src/plugman/platforms/ubuntu.js
@@ -92,10 +92,14 @@ module.exports = {
     'resource-file':{
         install:function(source_el, plugin_dir, project_dir, plugin_id) {
             var dest = path.join('qml', path.basename(source_el.attrib.src));
+            if (source_el.attrib['target-dir'])
+                dest = path.join(source_el.attrib['target-dir'], 
path.basename(source_el.attrib.src));
             common.copyFile(plugin_dir, source_el.attrib.src, project_dir, 
dest);
         },
         uninstall:function(source_el, project_dir, plugin_id) {
             var dest = path.join(project_dir, 'qml');
+            if (source_el.attrib['target-dir'])
+                dest = path.join(project_dir, source_el.attrib['target-dir']);
             shell.rm(path.join(dest, path.basename(source_el.attrib.src)));
         }
     },

Reply via email to