#!/bin/bash

git diff --staged --name-only | grep doc/man/taskopen.1 >> /dev/null
if [ $? -eq 0 ]; then
    groff -mandoc -T html doc/man/taskopen.1 > doc/html/taskopen\(1\).html
    git add doc/html/*
fi

git diff --staged --name-only | grep doc/man/taskopenrc.5 >> /dev/null
if [ $? -eq 0 ]; then
    groff -mandoc -T html doc/man/taskopenrc.5 > doc/html/taskopenrc\(5\).html
    git add doc/html/*
fi
