Added 'update_ilines.sh' which will generate CH and LI I lines on demand. Let's not cron this yet :)
git-svn-id: svn+ssh://svn.ipng.nl/usr/share/subversion/repositories/ircnet.ipng.ch@3 c5d60b8d-fdcb-4146-b734-af4215e9eb71
This commit is contained in:
@ -102,7 +102,7 @@ def main():
|
||||
assert False, "Input file version is not '2'"
|
||||
ofile.write("# First line: %s\n" % line)
|
||||
|
||||
ofile.write("# $Id: $\n\n\n")
|
||||
ofile.write("#\n\n")
|
||||
|
||||
output_linecount = 0
|
||||
for line in ifile.readlines():
|
||||
|
20
ripedb/update_ilines.sh
Normal file
20
ripedb/update_ilines.sh
Normal file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
INPUT="delegated-ripencc-latest"
|
||||
|
||||
do_country()
|
||||
# $1=country $2=class $3=threshold
|
||||
{
|
||||
./ilines.py -i $INPUT -o ilines.$1.$$ -y $2 -c $1
|
||||
[ ! -r ilines.$1.$$ ] && return -1
|
||||
[ `wc -l ilines.$1.$$ | awk '{ print $1 }'` -lt $3 ] && {
|
||||
echo "$1: File too short, less than $3 lines"
|
||||
return -2
|
||||
}
|
||||
mv ilines.$1.$$ ../include/ilines.$1.conf
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
do_country ch 200 1000
|
||||
do_country li 202 15
|
Reference in New Issue
Block a user