#!/bin/bash
count=10000
if [ $# -gt 0 ]
then
count=$1
fi
echo "About to generate $count phonebook records"
number=0
echo "making phonebook.txt..."
head -n $count /usr/share/dict/words |
while read line
do
echo -e "$line\t0\t0\t$number\t\t\t\t\t\t/usr/local/lgvp/photos/snapshot/no_photo.png\t20000101054226005\t20000101054226"
number=`expr $number + 1`
done > phonenumber.txt
echo "made phonebook.txt"
echo "making phonedb.db..."
python ./convert.py | sqlite3 phonedb.db
echo "made phonedb.db"
# echo "select * from phonedb;" | sqlite3 phonedb.db > /dev/null