Add icons, add correct paths

This commit is contained in:
Pieter Vander Vennet 2021-04-11 20:42:18 +02:00
parent bda4c41364
commit 6dba4ea81c
6 changed files with 122 additions and 11 deletions

View file

@ -16,6 +16,8 @@ if(process.argv.length == 2){
}
const path = process.argv[2]
const dir = path.substring(0, path.lastIndexOf("/"))
console.log("Fixing up ", path)
const themeConfigJson : LayoutConfigJson = JSON.parse(readFileSync(path, "UTF8"))
@ -47,7 +49,7 @@ for (const layerConfigJson of themeConfigJson.layers) {
authors: [],
sources: [remoteImage]
})
replacements.push({source: remoteImage, destination: imgPath})
replacements.push({source: remoteImage, destination: `${dir}/${imgPath}`})
}
}
@ -56,7 +58,6 @@ for (const replacement of replacements) {
fixedThemeJson = fixedThemeJson.replace(new RegExp(replacement.source, "g"), replacement.destination)
}
const dir = path.substring(0, path.lastIndexOf("/"))
const fixScriptPath = dir + "/fix_script_"+path.replace(/\//g,"_")+".sh"
writeFileSync(dir + "/generated.license_info.json", JSON.stringify(licenses, null, " "))
writeFileSync(fixScriptPath, linuxHints.join("\n"))