Skip to content

Commit

Permalink
Xiaomi/Aqara OTA-firmware
Browse files Browse the repository at this point in the history
* fix for relative path (for windows). no throw error when no file.
  • Loading branch information
Киров Илья committed Apr 4, 2021
1 parent 8354bde commit 4710254
Show file tree
Hide file tree
Showing 41 changed files with 400 additions and 2 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added images/Xiaomi/lumi.light.aqcn02_32.ota
Binary file not shown.
Binary file not shown.
392 changes: 391 additions & 1 deletion index.json

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion scripts/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const manufacturerNameLookup = {
4151: 'Eurotronic',
4678: 'Danfoss',
4687: 'Gledopto',
4447: 'Xiaomi',
};

const main = async () => {
Expand Down Expand Up @@ -98,7 +99,14 @@ const main = async () => {
indexJSON[index] = entry;

if (entry.path && entry.path !== destination) {
fs.unlinkSync(entry.path);
try {
fs.unlinkSync(path.resolve(entry.path));
} catch (err) {
if (err && err.code != 'ENOENT') {
console.error("Error in call to fs.unlink", err);
throw err;
}
}
}
} else {
console.log(`Added new entry (${JSON.stringify(entry)})`);
Expand Down

0 comments on commit 4710254

Please sign in to comment.