shithub: shithub

Download patch

ref: 91a48d6ba8a6a70febf0242e99ce4c96708e45ff
parent: 1a51231062636c8de1324d2fa1ffa573c2e04ef7
author: rodri <rgl@antares-labs.eu>
date: Wed Feb 26 09:16:41 EST 2025

info: clean up the description section generation

this also adds support for lowercase readme files.

--- a/info
+++ b/info
@@ -53,19 +53,16 @@
 }
 
 cd $gitfs/object/$hash/tree
+descfiles=(README^('' .md) readme^('' .md) desc description)
 echo '	<h3>About</h3>
 	<pre id="desc">'
-if(test -f $repodir/README)
-	htcat $repodir/README
-if not if(test -f README)
-	htcat README
-if not if (test -f README.md)
-	htcat README.md
-if not if(test -f $repodir/desc)
-	htcat $repodir/desc
-if not if(test -f $repodir/description)
-	htcat $repodir/description
-if not
+done=()
+for(f in $descfiles $repodir/^$descfiles)
+	if(~ $#done 0 && test -f $f){
+		htcat $f
+		done=1
+	}
+if(~ $#done 0)
 	echo 'this repo has no description'
 echo '
 	</pre>
--