real-world-onion-sites/wrapper.sh

40 lines
505 B
Bash
Raw Permalink Normal View History

2019-11-16 14:24:14 +00:00
#!/bin/sh
now=`date "+%Y%m%d%H%M%S"`
log="log-$now.txt"
2019-11-16 14:24:14 +00:00
csv="master.csv"
exe="./rwos-db.py"
#exec </dev/null 2>$log 1>&2
2019-11-16 14:24:14 +00:00
2019-11-16 21:02:54 +00:00
case "x$1" in
x-n) dofetch=false ;;
*) dofetch=true ;;
esac
2019-11-16 14:24:14 +00:00
set -x
2019-11-16 21:02:54 +00:00
if $dofetch ; then
date
./get-fresh-csv.sh || exit 1
date
./get-securedrop-csv.py || exit 1
date
2019-11-16 21:02:54 +00:00
$exe fetch || exit 1
fi
2019-11-16 14:24:14 +00:00
date
2019-11-16 14:24:14 +00: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 14:24:14 +00:00
exit 0