Merges George changes
[p2p-testing-infrastructure.git] / ControlScripts / parse_client_log.sh
1 #!/bin/bash
2 #
3 # 2010 Razvan Deaconescu, razvan.deaconescu@cs.pub.ro
4 #
5 # Parse log file
6 # The script
7 #  * parses a client-specific log file
8 #
9 # Command line argument specifies client type, log folder and log file
10
11 # use _DEBUG="off" to turn off debug printing
12 _DEBUG="off"
13
14 if test $# -ne 3; then
15         echo "usage: $0 client-type log-folder log-file" 1>&2
16         exit 1
17 fi
18
19 # Read the global configuration file
20 # Check if the global configuration file exists
21 if [ ! -e globalconfig ]; then
22         echo "Warning: The global config file globalconfig does not exist."
23 else
24         source globalconfig
25 fi
26
27 # Read client mappings configuration file
28 # Check if the client mappings configuration file exists
29 if [ ! -e client_script_mappings ]; then
30         echo "Warning: The client mappings config file client_script_mappings does not exist."
31 else
32         source client_script_mappings
33 fi
34
35 client_type=$1
36 log_folder=$2
37 log_file=$3
38
39 parse_client_log ${client_type} ${log_folder} ${log_file}