#!/bin/sh

find . -name '*.gmi' |
    while read file; do
        htmlfile=$(dirname "$file")/$(basename "$file" .gmi).html
        if [ ! -e "$htmlfile" ] || [ "$file" -nt "$htmlfile" ]; then
            echo "Creando $htmlfile"
            ./gmi2html "$file" > "$htmlfile"
        fi
    done