fix language scanner
parent
064eade0eb
commit
537ece3f89
|
|
@ -122,25 +122,11 @@ function log(s) {
|
||||||
console.log(s);
|
console.log(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
var appsFile, apps;
|
var apploader = require("./lib/apploader.js");
|
||||||
try {
|
apploader.init({
|
||||||
appsFile = fs.readFileSync(BASEDIR+"apps.json").toString();
|
DEVICEID : "BANGLEJS2"
|
||||||
} catch (e) {
|
|
||||||
ERROR("apps.json not found");
|
|
||||||
}
|
|
||||||
if (appsFile.indexOf("---") === 0 && fs.existsSync(BASEDIR+"bin/create_apps_json.sh"))
|
|
||||||
{
|
|
||||||
console.log("apps.json has not been generated, running bin/create_apps_json.sh to build it...");
|
|
||||||
childProcess.execFileSync(BASEDIR+'bin/create_apps_json.sh',[],{
|
|
||||||
stdio: 'inherit'
|
|
||||||
});
|
});
|
||||||
appsFile = fs.readFileSync(BASEDIR+"apps.json").toString();
|
var apps = apploader.apps;
|
||||||
}
|
|
||||||
try{
|
|
||||||
apps = JSON.parse(appsFile);
|
|
||||||
} catch (e) {
|
|
||||||
ERROR("apps.json not valid JSON");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Given a string value, work out if it's obviously not a text string
|
// Given a string value, work out if it's obviously not a text string
|
||||||
function isNotString(s, wasFnCall, wasArrayAccess) {
|
function isNotString(s, wasFnCall, wasArrayAccess) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue