]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
contrithanks.sh: update docs/THANKS in place
authorDaniel Stenberg <daniel@haxx.se>
Mon, 24 Feb 2025 10:04:30 +0000 (11:04 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 24 Feb 2025 12:04:11 +0000 (13:04 +0100)
Now using 'sort' for sorting the names. This has the small side-effect
that it sorts slightly different than the previously used sort function
(emacs).

I think this is a better sort and over all it makes it more convenient
to use the script as it removes a manual step.

Closes #16448

scripts/contrithanks.sh

index d212d35d2a7463043e921ff52fc12dbc2b370d56..a91bfeb32f6b7a46a733ff6278e4a5ec27ccb2d4 100755 (executable)
@@ -43,8 +43,12 @@ fi
 # We also include curl-www if possible. Override by setting CURLWWW
 CURLWWW="${CURLWWW:-../curl-www}"
 
-cat ./docs/THANKS | sed 's/ github/ github/i'
+rand="./docs/THANKS.$$"
 
+# output the existing list of names with lowercase github
+tail -n +7 ./docs/THANKS | sed 's/ github/ github/i'  > $rand
+
+# get new names using git
 {
   {
     git log --use-mailmap "$start..HEAD"
@@ -71,4 +75,19 @@ cat ./docs/THANKS | sed 's/ github/ github/i'
 } | \
 sed -f ./docs/THANKS-filter | \
 sort -fu | \
-grep -aixvFf ./docs/THANKS
+grep -aixvFf ./docs/THANKS >> $rand
+
+# output header
+cat <<EOF >./docs/THANKS
+ This project has been alive for many years. Countless people have provided
+ feedback that have improved curl. Here follows a list of people that have
+ contributed (a-z order).
+
+ If you have contributed but are missing here, please let us know!
+
+EOF
+# append all the names, sorted case insensitively
+grep -v "^ " $rand | sort -f $rand >> ./docs/THANKS
+
+# get rid of the temp file
+rm $rand