wrenix.eu/symlink.sh
2024-11-07 20:34:34 +01:00

14 lines
426 B
Bash
Executable file

#!/bin/sh
find content/docs/helm-charts -iname "*.md" -not -path "content/docs/helm-charts/_index*.md" -delete
for p in "../helm-charts/"* ; do
if [ ! -d $p ] ||[ ! -f $p/Chart.yaml ] ; then
continue;
fi
name=$(basename "${p}")
echo "== helm-charts/${name}:"
if [ ! -f $p/README.md ]; then
echo "not yet in markdown"
else
ln -s "../../../${p}/README.md" "content/docs/helm-charts/${name}.md"
fi
done