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/e7b09b5c Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/e7b09b5c Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/e7b09b5c Branch: refs/heads/master Commit: e7b09b5cc9989f8439e877c7ed0cd38c3cecc2ea Parents: 55c3d1e Author: Maxim Ermilov <maxim.ermi...@canonical.com> Authored: Tue Aug 19 15:10:17 2014 +0400 Committer: Anis Kadri <a...@apache.org> Committed: Fri Sep 5 11:12:19 2014 -0700 ---------------------------------------------------------------------- cordova-lib/src/plugman/platforms/ubuntu.js | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/e7b09b5c/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))); } },