You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by za...@apache.org on 2014/12/15 14:33:01 UTC
[12/37] cordova-ubuntu git commit: Fixed issues identified by
@zaspire for merge request.
Fixed issues identified by @zaspire for merge request.
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/c376721e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/c376721e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/c376721e
Branch: refs/heads/master
Commit: c376721e22199382bbf3a3d4c6ec8e87622f6247
Parents: 4894ac2
Author: Jean-Francois Moy <je...@gmail.com>
Authored: Thu Oct 30 10:30:15 2014 +0000
Committer: Jean-Francois Moy <je...@gmail.com>
Committed: Thu Oct 30 10:30:15 2014 +0000
----------------------------------------------------------------------
bin/check_reqs | 2 +-
bin/create | 2 +-
bin/lib/check_reqs.js | 46 ++++++++++++-------------
bin/lib/create.js | 38 ++++++++++----------
bin/lib/update.js | 13 ++++---
bin/templates/project/cordova/lib/build.js | 8 ++---
bin/update | 2 +-
7 files changed, 55 insertions(+), 56 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/c376721e/bin/check_reqs
----------------------------------------------------------------------
diff --git a/bin/check_reqs b/bin/check_reqs
index 676f105..bfbe2fd 100755
--- a/bin/check_reqs
+++ b/bin/check_reqs
@@ -2,7 +2,7 @@
/*
*
- * Copyright 2014 Canonical Ltd.
+ * Copyright 2013, 2014 Canonical Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/c376721e/bin/create
----------------------------------------------------------------------
diff --git a/bin/create b/bin/create
index 29c41d4..942e4e7 100755
--- a/bin/create
+++ b/bin/create
@@ -2,7 +2,7 @@
/*
*
- * Copyright 2014 Canonical Ltd.
+ * Copyright 2013, 2014 Canonical Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/c376721e/bin/lib/check_reqs.js
----------------------------------------------------------------------
diff --git a/bin/lib/check_reqs.js b/bin/lib/check_reqs.js
index 1853828..df0ffd6 100644
--- a/bin/lib/check_reqs.js
+++ b/bin/lib/check_reqs.js
@@ -2,7 +2,7 @@
/*
*
- * Copyright 2014 Canonical Ltd.
+ * Copyright 2013, 2014 Canonical Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,24 +22,24 @@
var exec = require('child_process').exec;
var DEPENDENCIES = [
- 'click',
- 'cmake',
- 'libicu-dev',
- 'pkg-config',
- 'devscripts',
- 'qtbase5-dev',
- 'qtchooser',
- 'qtdeclarative5-dev',
- 'qtfeedback5-dev',
- 'qtlocation5-dev',
- 'qtmultimedia5-dev',
- 'qtpim5-dev',
- 'libqt5sensors5-dev',
- 'qtsystems5-dev'
+ 'click',
+ 'cmake',
+ 'libicu-dev',
+ 'pkg-config',
+ 'devscripts',
+ 'qtbase5-dev',
+ 'qtchooser',
+ 'qtdeclarative5-dev',
+ 'qtfeedback5-dev',
+ 'qtlocation5-dev',
+ 'qtmultimedia5-dev',
+ 'qtpim5-dev',
+ 'libqt5sensors5-dev',
+ 'qtsystems5-dev'
];
exports.check_reqs = function (callback) {
- if (!checkNodeDependencies()) {
+ if (!checkNodeDependencies()) {
installNodeDependencies(checkUbuntuDependencies.bind(null, callback));
} else {
checkUbuntuDependencies(callback);
@@ -47,14 +47,14 @@ exports.check_reqs = function (callback) {
};
function checkUbuntuDependencies(callback) {
- var deps = DEPENDENCIES.join(' ');
- exec("dpkg-query -Wf'${db:Status-abbrev}\\n'" + deps, function (error, stdout, stderr) {
- if (error !== null) {
- console.error('Error: missing dependency ' + deps);
- process.exit(1);
- }
+ var deps = DEPENDENCIES.join(' ');
+ exec("dpkg-query -Wf'${db:Status-abbrev}\\n'" + deps, function (error, stdout, stderr) {
+ if (error !== null) {
+ console.error('Error: missing dependency ' + deps);
+ process.exit(1);
+ }
callback();
- });
+ });
}
function checkNodeDependencies() {
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/c376721e/bin/lib/create.js
----------------------------------------------------------------------
diff --git a/bin/lib/create.js b/bin/lib/create.js
index ad03cd8..5224bb8 100644
--- a/bin/lib/create.js
+++ b/bin/lib/create.js
@@ -2,7 +2,7 @@
/*
*
- * Copyright 2014 Canonical Ltd.
+ * Copyright 2013, 2014 Canonical Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,12 +19,12 @@
*
*/
-var shell = require('shelljs'),
- // child_process = require('child_process'),
- path = require('path'),
- fs = require('fs'),
- check_reqs = require('./check_reqs').check_reqs,
- ROOT = path.join(__dirname, '..', '..');
+var shell = require('shelljs');
+var path = require('path');
+var fs = require('fs');
+var check_reqs = require('./check_reqs').check_reqs;
+
+var ROOT = path.join(__dirname, '..', '..');
exports.createProject = function(projectPath, packageName, projectName) {
if (fs.existsSync(projectPath)) {
@@ -38,24 +38,24 @@ exports.createProject = function(projectPath, packageName, projectName) {
'Project Name: ' + projectName + '\n'
);
- shell.mkdir(projectPath);
+ shell.mkdir(projectPath);
- shell.cp('-r', path.join(ROOT, '*'), path.join(projectPath, 'build'));
+ shell.cp('-r', path.join(ROOT, '*'), path.join(projectPath, 'build'));
- shell.mkdir(path.join(projectPath, 'native'));
+ shell.mkdir(path.join(projectPath, 'native'));
- // Copy the necessary node_modules for building and running the project.
- shell.cp('-r', path.join(ROOT, 'node_modules'), path.join(projectPath, 'cordova'));
+ // Copy the necessary node_modules for building and running the project.
+ shell.cp('-r', path.join(ROOT, 'node_modules'), path.join(projectPath, 'cordova'));
- // Checking requirements task needs to be copied as well.
- shell.cp('-r', path.join(ROOT, 'bin/check_reqs'), path.join(projectPath, 'cordova'));
- shell.cp('-r', path.join(ROOT, 'bin', 'lib', 'check_reqs.js'), path.join(projectPath, 'cordova', 'lib'));
+ // Checking requirements task needs to be copied as well.
+ shell.cp('-r', path.join(ROOT, 'bin/check_reqs'), path.join(projectPath, 'cordova'));
+ shell.cp('-r', path.join(ROOT, 'bin', 'lib', 'check_reqs.js'), path.join(projectPath, 'cordova', 'lib'));
- // Copy the default template including the defaults.xml for the Ubuntu platform.
- shell.cp('-r', path.join(ROOT, 'bin', 'templates', 'project', 'cordova'), projectPath);
+ // Copy the default template including the defaults.xml for the Ubuntu platform.
+ shell.cp('-r', path.join(ROOT, 'bin', 'templates', 'project', 'cordova'), projectPath);
- shell.mkdir(path.join(projectPath, 'www'));
- shell.cp(path.join(ROOT, 'www', 'cordova.js'), path.join(projectPath, 'www'));
+ shell.mkdir(path.join(projectPath, 'www'));
+ shell.cp(path.join(ROOT, 'www', 'cordova.js'), path.join(projectPath, 'www'));
shell.cp('-r', path.join(ROOT, 'xml/config.xml'), projectPath);
}
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/c376721e/bin/lib/update.js
----------------------------------------------------------------------
diff --git a/bin/lib/update.js b/bin/lib/update.js
index f7b288f..f315501 100644
--- a/bin/lib/update.js
+++ b/bin/lib/update.js
@@ -2,7 +2,7 @@
/*
*
- * Copyright 2014 Canonical Ltd.
+ * Copyright 2013, 2014 Canonical Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,12 +19,11 @@
*
*/
-var shell = require('shelljs'),
- // child_process = require('child_process'),
- path = require('path'),
- fs = require('fs'),
- check_reqs = require('./check_reqs'),
- ROOT = path.join(__dirname, '..', '..');
+var shell = require('shelljs');
+var path = require('path');
+var fs = require('fs');
+
+var ROOT = path.join(__dirname, '..', '..');
exports.updateProject = function(projectPath) {
if (!fs.existsSync(projectPath)) {
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/c376721e/bin/templates/project/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/lib/build.js b/bin/templates/project/cordova/lib/build.js
index ba4a7e9..b970ef7 100644
--- a/bin/templates/project/cordova/lib/build.js
+++ b/bin/templates/project/cordova/lib/build.js
@@ -74,7 +74,7 @@ function buildClickPackage(campoDir, ubuntuDir, nobuild, architecture, framework
shell.mkdir(path.join(archDir, 'build'));
shell.mkdir(prefixDir);
- shell.pushd(path.join(archDir, 'build'));
+ Utils.pushd(path.join(archDir, 'build'));
var buildType = '"Debug"';
if (!debug)
@@ -114,7 +114,7 @@ function buildClickPackage(campoDir, ubuntuDir, nobuild, architecture, framework
content.policy_version = 1.1;
fs.writeFileSync(path.join(prefixDir, 'apparmor.json'), JSON.stringify(content));
- shell.pushd(prefixDir);
+ Utils.pushd(prefixDir);
return Utils.execAsync('click build .');
}).then(function () {
@@ -140,7 +140,7 @@ function buildNative(campoDir, ubuntuDir, nobuild, debug) {
shell.mkdir('-p', path.join(nativeDir, 'build'));
shell.mkdir(prefixDir);
- shell.pushd(path.join(nativeDir, 'build'));
+ Utils.pushd(path.join(nativeDir, 'build'));
var buildType = '"Debug"';
if (!debug)
@@ -243,7 +243,7 @@ function additionalBuildDependencies(ubuntuDir) {
}
function checkClickPackage(prefixDir) {
- shell.pushd(prefixDir);
+ Utils.pushd(prefixDir);
// 13.10 missing click-reviewers-tools package
// FIXME: remove this check after EOL
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/c376721e/bin/update
----------------------------------------------------------------------
diff --git a/bin/update b/bin/update
index e5f9bbe..4f4328f 100755
--- a/bin/update
+++ b/bin/update
@@ -2,7 +2,7 @@
/*
*
- * Copyright 2014 Canonical Ltd.
+ * Copyright 2013, 2014 Canonical Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org