Files
ircnet.ipng.ch/ripedb/update_ilines.sh
ircnet d69333744b 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
2009-09-03 19:34:55 +00:00

21 lines
405 B
Bash

#!/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