#!/bin/bash set -e cd /data/www/lab.nethence.com/pmr-exchange-rates/ date_file=`date +%Y-%m-%d` date_file_prev=`date -d '-1 day' +%Y-%m-%d` echo -n dump html from rates.html ... if [[ -f $date_file.rates.txt ]]; then echo already else lynx -dump https://www.agroprombank.com/info/rates.html > $date_file.rates.txt && echo done fi echo -n writing $date_file.md ... ./exchange-rates.ksh > $date_file.md && echo done echo -n converting to html... markdown -f autolink,fencedcode $date_file.md | sed -r ' s%
%%g;
s%
%%g
' > $date_file.html && echo done
echo -n copying to conspiland.fr ...
cp -a $date_file.html /data/www/conspiland.fr/pmr-exchange-rates && echo done
echo
cat <