fix broken scripts after metadata.json update
parent
5ce3b4adaf
commit
1a92cc2557
|
|
@ -57,7 +57,7 @@ function fileGetter(url) {
|
||||||
|
|
||||||
Promise.all(APPS.map(appid => {
|
Promise.all(APPS.map(appid => {
|
||||||
try {
|
try {
|
||||||
var app = JSON.parse(fs.readFileSync(APPDIR + "/" + appid + "metadata.json").toString());
|
var app = JSON.parse(fs.readFileSync(APPDIR + "/" + appid + "/metadata.json").toString());
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw new Error(`App ${appid} not found`);
|
throw new Error(`App ${appid} not found`);
|
||||||
}
|
}
|
||||||
|
|
@ -77,6 +77,7 @@ Promise.all(APPS.map(appid => {
|
||||||
js += `\x10if (E.CRC32(require('Storage').read(${JSON.stringify(file.name)}))!=${file.crc}){console.log("${file.name} invalid");FAIL++}\n`;
|
js += `\x10if (E.CRC32(require('Storage').read(${JSON.stringify(file.name)}))!=${file.crc}){console.log("${file.name} invalid");FAIL++}\n`;
|
||||||
}*/
|
}*/
|
||||||
});
|
});
|
||||||
|
// js = js.replace(/\x10/g,""); // remove the echo-off characters (for testing only)
|
||||||
fs.writeFileSync(OUTFILE, js);
|
fs.writeFileSync(OUTFILE, js);
|
||||||
console.log("Output written to "+OUTFILE);
|
console.log("Output written to "+OUTFILE);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,7 @@ function evaluateFile(file) {
|
||||||
|
|
||||||
Promise.all(APPS.map(appid => {
|
Promise.all(APPS.map(appid => {
|
||||||
try {
|
try {
|
||||||
var app = JSON.parse(fs.readFileSync(APPDIR + "/" + appid + "metadata.json").toString());
|
var app = JSON.parse(fs.readFileSync(APPDIR + "/" + appid + "/metadata.json").toString());
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw new Error(`App ${appid} not found`);
|
throw new Error(`App ${appid} not found`);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue