#! /bin/bash
# Scarica i dati della PC e li plotta

# By Davide Manini
# 12 Marzo 2020

wget_options="-N --quiet"

if [ -x /usr/bin/wget ]
then
    wget $wget_options https://raw.githubusercontent.com/pcm-dpc/COVID-19/master/dati-regioni/dpc-covid19-ita-regioni.csv
    wget $wget_options https://raw.githubusercontent.com/pcm-dpc/COVID-19/master/dati-andamento-nazionale/dpc-covid19-ita-andamento-nazionale.csv
else
    echo "Wget not present. Assuming that the data files are present." > /dev/stderr
fi


    
if [ -x /usr/bin/gnuplot ]
then
    gnuplot covid.gnu
else
    echo "Fatal error: gnuplot not found." > /dev/stderr
fi
    
#[ -x /usr/bin/display ] && display covid.png
