#!/bin/bash DATABASE_FILE=client-limitation-experiment.db REPOSITORY_ROOT=../cs-p2p-next echo "Running libtorrent log file parser." echo "Database file is $DATABASE_FILE" echo -e "Repository root is $REPOSITORY_ROOT" echo -e "Going hot ...\n" id=0 start_from=21 for folder in $(find .. -type d -name 'p2p-next-*' | sort); do ((id++)) if test $id -lt $start_from; then continue fi echo "Parsing status folder $folder for session id $id ... " for log_file in $(find $folder/log/libtorrent_logs5* -type f); do yes y | PYTHONPATH=$REPOSITORY_ROOT/db/ python $REPOSITORY_ROOT/log-parser/libtorrent/LogParser.py -i $id -f $log_file $DATABASE_FILE done done