sfizz/doxygen/scripts/generate_api_index.sh

20 lines
454 B
Bash
Raw Normal View History

#!/bin/bash
# Must be called from the root directory
2020-04-06 14:19:55 +02:00
if [[ -f api_index.md ]]; then rm api_index.md; fi
cat >>api_index.md <<EOF
---
title: "API"
---
EOF
2020-04-06 14:19:55 +02:00
tags=()
for tag in $(git tag --list); do
if [[ ${tag} != "list" && ${tag} != *"test"* ]]; then
2020-04-06 14:19:55 +02:00
tag=$(echo "${tag}" | sed -r 's/v//g')
tags+=("${tag}")
fi
done
2020-04-06 14:19:55 +02:00
IFS=$'\n' tags=($(sort <<<"${tags[*]}")); unset IFS
for tag in "${tags[@]}"; do
echo "- [${tag}](${tag})" >> api_index.md
done