cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [3/4] git commit: ubuntu: support target-dir for resource-file
Date Wed, 20 Aug 2014 14:41:31 GMT
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 <maxim.ermilov@canonical.com>
Authored: Tue Aug 19 15:10:17 2014 +0400
Committer: Andrew Grieve <agrieve@chromium.org>
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)));
         }
     },


Mime
View raw message