Uniformisation des documentations

This commit is contained in:
2023-12-14 21:29:06 +01:00
parent 34e7b33357
commit eb8bf3ed38
11 changed files with 211 additions and 102 deletions

11
prep.sh
View File

@@ -122,14 +122,21 @@ ls local/share/man/ -c1 >.config/files_local-share-man
for fichier in local/share/doc/*.md; do
echo "Résumé pour $fichier :"
description_found=0
empty_line_encountered=false
description_started=0
while IFS= read -r ligne; do
if [ "$description_found" -eq 1 ] && [ -n "$ligne" ]; then
if [ "$description_found" -eq 1 ] && [ "$description_started" -eq 1 ] && [ -n "$ligne" ]; then
echo "$ligne"
break
elif [ "$description_found" -eq 1 ] && [ "$description_started" -eq 0 ] && [ -n "$ligne" ]; then
echo "$ligne"
description_started=1
elif [ "$description_found" -eq 1 ] && [ "$description_started" -eq 1 ] && [ ! -n "$ligne" ]; then
break
elif [ "$ligne" = "# DESCRIPTION" ]; then
description_found=1
fi
done < "$fichier"
echo "..."