2 COMMONS
="commons-codec-1.4.jar"
3 CURRENT
=`date -d'30 minutes ago' -u +%Y-%m-%d-%H-00-00`
5 if [ ! -f $COMMONS ]; then
6 echo "$COMMONS not found. Please download Apache Commons Codec 1.4."
10 if [ ! -d descriptors
]; then
16 echo "Downloading descriptors from the metrics website..."
17 curl https
://metrics.torproject.org
/votes?valid-after
=$CURRENT \
18 > descriptors
/$CURRENT-votes
19 curl https
://metrics.torproject.org
/consensus?valid-after
=$CURRENT \
20 > descriptors
/$CURRENT-consensus
21 curl https
://metrics.torproject.org
/serverdesc?valid-after
=$CURRENT \
22 > descriptors
/$CURRENT-serverdesc
24 if [ ! -f ParseDescriptors.class
]; then
26 javac
-cp commons-codec-1.4.jar ParseDescriptors.java
29 echo "Parsing descriptors..."
30 java
-cp .
:commons-codec-1.4.jar ParseDescriptors
33 R
--slave -f bandwidth-comparison.R
35 echo "Terminating. Please find the .png files in this directory."