]> git.armaanb.net Git - lightcards.git/blobdiff - contrib/manconvert
Changing version in setup.py changes everywhere
[lightcards.git] / contrib / manconvert
index 65536378964ea87b21cb7b93de4eb41d2adbb165..8c4afbfd28466116e399b19cb024a2e3dcaed737 100755 (executable)
@@ -1,4 +1,7 @@
 #!/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