Skip to content

Commit

Permalink
add readme-update-last-100-commits.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
milahu committed Nov 24, 2023
1 parent 5e997c0 commit 25101e0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/scripts/readme-update-last-100-commits.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

set -e
set -x

command -v sponge
command -v git
command -v grep

cd "$(dirname "$0")"/../..

{
grep -B99999 -Fx '<!-- <last-100-commits> -->' readme.md
echo
git log --format=' %H `%T` %ai %f' | tac | grep -n '.*' | sed -E 's/^([0-9]+): (.*)$/\1\\. \2 /' | tac | head -n100
echo
grep -A99999 -Fx '<!-- </last-100-commits> -->' readme.md
} | sponge readme.md

0 comments on commit 25101e0

Please sign in to comment.