@@ -17,7 +17,7 @@ APP_NAME=https-everywhere
1717
1818cd " ` dirname $0 ` "
1919RULESETS_UNVALIDATED=" $PWD /pkg/rulesets.unvalidated.sqlite"
20- RULESETS_SQLITE =" $PWD /src/defaults/rulesets.sqlite "
20+ RULESETS_JSON =" $PWD /src/defaults/rulesets.json "
2121ANDROID_APP_ID=org.mozilla.firefox
2222VERSION=` echo $1 | cut -d " -" -f 2`
2323
@@ -55,7 +55,7 @@ if [ -n "$1" ] && [ "$2" != "--no-recurse" ] ; then
5555 exit 0
5656fi
5757
58- # Only generate the sqlite database if any rulesets have changed. Tried
58+ # Only generate the ruleset database if any rulesets have changed. Tried
5959# implementing this with make, but make is very slow with 15k+ input files.
6060needs_update () {
6161 find src/chrome/content/rules/ -newer $RULESETS_UNVALIDATED | \
@@ -69,7 +69,7 @@ if [ ! -f "$RULESETS_UNVALIDATED" ] || needs_update ; then
6969 # Those cover everything but it wouldn't matter if they didn't
7070 nohup cat src/chrome/content/rules/" $firstchar " * .xml > /dev/null 2> /dev/null &
7171 done
72- echo " Generating sqlite DB"
72+ echo " Generating ruleset DB"
7373 python2.7 ./utils/make-sqlite.py
7474fi
7575
@@ -81,11 +81,7 @@ die() {
8181 exit 1
8282}
8383
84- # If the unvalidated rulesets have changed, validate and copy to the validated
85- # rulesets file.
86- if [ " $RULESETS_UNVALIDATED " -nt " $RULESETS_SQLITE " ] ; then
87- bash utils/validate.sh
88- fi
84+ bash utils/validate.sh
8985
9086# The name/version of the XPI we're building comes from src/install.rdf
9187XPI_NAME=" pkg/$APP_NAME -` grep em:version src/install.rdf | sed -e ' s/[<>]/ /g' | cut -f3` "
@@ -128,7 +124,7 @@ rm -f "${XPI_NAME}-amo.xpi"
128124python2.7 utils/create_xpi.py -n " ${XPI_NAME} -eff.xpi" -x " .build_exclusions" " pkg/xpi-eff"
129125python2.7 utils/create_xpi.py -n " ${XPI_NAME} -amo.xpi" -x " .build_exclusions" " pkg/xpi-amo"
130126
131- echo >&2 " Total included rules: ` sqlite3 $RULESETS_SQLITE ' select count(*) from rulesets ' ` "
127+ echo >&2 " Total included rules: ` find src/chrome/content/rules -name " *.xml " | wc -l ` "
132128echo >&2 " Rules disabled by default: ` find src/chrome/content/rules -name " *.xml" | xargs grep -F default_off | wc -l` "
133129echo >&2 " Created ${XPI_NAME} -eff.xpi and ${XPI_NAME} -amo.xpi"
134130
0 commit comments