#!/usr/bin/env sh
-for i in man/*; do
- pandoc ${i} -s -t man -o $(echo ${i} | 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