Ensure TLDs can be updated using up-to-date src/lib/tld.js as the template.
This commit is contained in:
parent
8c8b959474
commit
bbe443e724
|
@ -42,8 +42,8 @@ sub generate {
|
|||
open(SRC, $src) || die("Cannot open $src");
|
||||
open(DST, ">$dst") || die("Cannot open $dst");
|
||||
while(<SRC>) {
|
||||
s/%tld_rx%/$rx/g;
|
||||
s/%tld_ex%/$ex/g;
|
||||
s/(_tldRx:\s*\/\(.*?\))\S*?(\$\/)/$1$rx$2/g;
|
||||
s/(_tldEx:\s*\/\(.*?\))\S*?(\$\/)/$1$ex$2/g;
|
||||
print DST;
|
||||
print;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#!/bin/bash
|
||||
BASE=$(dirname "$0")
|
||||
if [ -f "$1" ]; then
|
||||
cp "$1" "$BASE/tld_template.js"
|
||||
fi
|
||||
pushd "$BASE"
|
||||
fname=public_suffix_list.dat
|
||||
nflag=""
|
||||
|
|
File diff suppressed because one or more lines are too long
2
build.sh
2
build.sh
|
@ -23,7 +23,7 @@ XPI="$XPI_DIR/noscript-$VER"
|
|||
LIB="$SRC/lib"
|
||||
TLD="$BASE/TLD"
|
||||
|
||||
if ! [ $(date -r "$LIB/tld.js" +'%Y%m%d') -ge $(date +'%Y%m%d') ] && "$TLD/generate.sh"; then
|
||||
if ! [ $(date -r "$LIB/tld.js" +'%Y%m%d') -ge $(date +'%Y%m%d') ] && "$TLD/generate.sh" "$LIB/tld.js"; then
|
||||
cp -u "$TLD/tld.js" "$LIB"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue