Bug 1164580 - Preprocess ua-update.json via slashslash filter. r=fabrice

This commit is contained in:
Mike Taylor 2015-05-27 10:37:00 -04:00
parent 95309090d2
commit 274eda3cd5
3 changed files with 6 additions and 14 deletions

View File

@ -5,16 +5,6 @@
USE_RCS_MK := 1
include $(topsrcdir)/config/makefiles/rcs.mk
UA_UPDATE_FILE = ua-update.json
$(UA_UPDATE_FILE): % : %.in
# strip out comment lines, which are not valid in JSON
sed -e '/^ *\/\//d' -e '/^ *$$/d' $^ > $@
UA_UPDATE_FILES = $(UA_UPDATE_FILE)
UA_UPDATE_DEST = $(FINAL_TARGET)
INSTALL_TARGETS += UA_UPDATE
# Make sure the standalone glue doesn't try to get libxpcom.so from b2g/app.
NSDISTMODE = copy

View File

@ -81,3 +81,6 @@ JS_PREFERENCE_FILES += [
'b2g.js',
]
DIST_FILES += [
'ua-update.json.in',
]

View File

@ -1,7 +1,6 @@
// Comments must be on their own lines and must start with "//"
// Send these sites a custom user-agent. Bugs to remove each override after
// evangelism are included.
#filter slashslash
// Everything after the first // on a line will be removed by the preproccesor.
// Send these sites a custom user-agent. Bugs should be included with an entry.
{
// bug 826347, msn.com
"msn.com": "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19",