Remove dupes in the SHA file
This commit is contained in:
parent
f7a80d60d2
commit
c65131ecd3
1 changed files with 3 additions and 2 deletions
|
@ -21,9 +21,10 @@ function hashFile(path) {
|
|||
});
|
||||
}
|
||||
export default (async function (out, archiveFiles) {
|
||||
const filesToAnalyze = Array.from(new Set(archiveFiles.map(f => f.full))).sort;
|
||||
let s = "";
|
||||
for (const file of archiveFiles) {
|
||||
s += `${file.base}\t${await hashFile(file.full)}\n`;
|
||||
for (const file of filesToAnalyze) {
|
||||
s += `${file.base}\t${await hashFile(file)}\n`;
|
||||
}
|
||||
await fs.promises.writeFile(out, s);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue