Revision 2059fab6
Added by jahoti about 2 years ago
build.sh | ||
---|---|---|
271 | 271 |
(() => { |
272 | 272 |
$(map_get IMPORTCODES $FILEKEY) |
273 | 273 |
|
274 |
"; cat $FILE; echo " |
|
274 |
"; |
|
275 |
|
|
276 |
# A hack to insert the contents of default_settings.json at the appropriate location in background/main.js |
|
277 |
if [ "$FILE" = "background/main.js" ]; then |
|
278 |
# Uses an internal sed expression to escape and indent the JSON file for use in the external sed expression |
|
279 |
sed 's/^ `DEFAULT SETTINGS`$/'"$(sed -E 's/([\\\&\/])/\\\1/g; s/^/ /; s/$/\\/' < default_settings.json) "/g < "$FILE" |
|
280 |
else |
|
281 |
cat $FILE |
|
282 |
fi |
|
283 |
|
|
284 |
echo " |
|
275 | 285 |
|
276 | 286 |
$(map_get EXPORTCODES $FILEKEY) |
277 | 287 |
})();") > $BUILDDIR/$FILE |
Also available in: Unified diff
Revamp default settings
Default settings are now provided in the same format as data exported from the
extension, incorporating them into the main program as part of the build
process. Also, modify their contents; the apparently non-functional FSF stuff
is gone, replaced with fixes for BandCamp, WorldCat, and SumOfUs.