Files
ircnet.ipng.ch/ripedb/update_ilines.sh
pim 8bd12cc38a Rename ilines.py to delegated_ilines.py because I'm going to work on an
asset_ilines.py


git-svn-id: svn+ssh://svn.ipng.nl/usr/share/subversion/repositories/ircnet.ipng.ch@15 c5d60b8d-fdcb-4146-b734-af4215e9eb71
2009-09-04 08:49:13 +00:00

21 lines
415 B
Bash

#!/bin/sh
INPUT="delegated-ripencc-latest"
do_country()
# $1=country $2=class $3=threshold
{
./delegated_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