#!/usr/bin/env sh
-pandoc $1 -s -t man -o $(echo $1 | cut -d '.' -f -2)
+find man/*.md | \
+while read i; do
+ base=$(echo ${i} | cut -d '.' -f -2)
+ pandoc ${i} -s -t man -o ${base}
+ sed -i "s/VERSION_HERE/$(python3 -m lightcards -v)/g" ${base}
+done