THRESH=80
+usage_exit() {
+ echo "Usage: $0 [-m minimum-perc]"
+ exit 1
+}
+
+while getopts hm: OPT; do
+ case $OPT in
+ m) THRESH=$OPTARG ;;
+ #h) usage_exit ;;
+ h|\?) usage_exit ;;
+ esac
+done
+
SCRIPT_DIR=$(cd $(dirname $0) && pwd)
VENV=../$SCRIPT_DIR/../venv
make
echo 'Starting watchmedo to generate draft pages automatically...'
+echo "(minimum threshold is ${THRESH}%)"
watchmedo shell-command \
--command "make THRESH=$THRESH; date; echo" \
--wait --recursive \