1
0
Fork 0
mirror of https://github.com/Luzifer/3dmodels.git synced 2024-12-23 10:51:19 +00:00
3dmodels/ci/gen_readme.sh
Knut Ahlers af3673bdad
Add info which display the case is for
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2020-08-12 00:45:43 +02:00

11 lines
390 B
Bash
Executable file

#!/bin/bash
set -euo pipefail
# Reset README to template stub
cp ci/README.tpl.md README.md
for filename in *.jscad; do
title=$(awk -F ': ' '/title\s*:/{ print $2 }' "${filename}")
rev=$(awk -F ': ' '/revision\s*:/{ print $2 }' "${filename}")
echo "| [\`${filename%%.jscad}.stl\`](${filename%%.jscad}.stl) | [\`${filename}\`](${filename}) | ${rev# *} | ${title# *} |" >>README.md
done