refactor(console) onCloudCmd

This commit is contained in:
coderaiser 2014-05-20 07:18:51 -04:00
parent 0e004d80f7
commit ce53fbc848

View file

@ -241,20 +241,19 @@
}
}
function onCloudCmd(pCommand, callback) {
var lRet;
function onCloudCmd(cmd, callback) {
var is;
pCommand = Util.rmStr(pCommand, CLOUDCMD);
cmd = Util.rmStr(cmd, CLOUDCMD);
is = !equalPart(cmd, ' ');
if (!equalPart(pCommand, ' ')) {
lRet = true;
if (is) {
Util.exec(callback, HELP);
}
else {
pCommand = Util.rmStr(pCommand, ' ');
} else {
cmd = Util.rmStr(cmd, ' ');
is = update && equalPart(cmd, 'update');
if (equalPart(pCommand, 'update') && update) {
lRet = true;
if (is) {
update.get();
Util.exec(callback, {
@ -262,11 +261,13 @@
});
}
if (Util.strCmp(pCommand, 'exit'))
is = Util.strCmp(cmd, 'exit');
if (is)
process.exit();
}
return lRet;
return is;
}
function onCD(cmd, currDir, callback) {