real-world-onion-sites/wrapper.sh

39 lines
446 B
Bash
Raw Normal View History

2019-11-16 09:24:14 -05:00
#!/bin/sh
now=`date "+%Y%m%d%H%M%S"`
log="log-$now.txt"
2019-11-16 09:24:14 -05:00
csv="master.csv"
exe="./rwos-db.py"
exec </dev/null 2>$log 1>&2
2019-11-16 09:24:14 -05:00
2019-11-16 16:02:54 -05:00
case "x$1" in
x-n) dofetch=false ;;
*) dofetch=true ;;
esac
2019-11-16 09:24:14 -05:00
set -x
date
./get-fresh-csv.sh || exit 1
2019-11-16 09:24:14 -05:00
date
2019-11-16 16:02:54 -05:00
if $dofetch ; then
$exe fetch || exit 1
fi
2019-11-16 09:24:14 -05:00
date
2019-11-16 09:24:14 -05:00
(
cat 01-preamble.md
echo ""
$exe print || exit 1
echo ""
cat 02-footnotes.md
echo ""
) > README.md
date
$exe trash
date
2019-11-16 09:24:14 -05:00
exit 0