Skip to content

Commit

Permalink
dashify gennews
Browse files Browse the repository at this point in the history
  • Loading branch information
bbidulock committed Aug 29, 2017
1 parent 2ff785f commit 04d2a55
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions gennews.sh
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

# A little script to automagically generate a GNU NEWS file from git.

Expand All @@ -10,11 +10,12 @@ t=
i=0

for o in $(git tag --sort=-creatordate) ""; do
if [[ $((i++)) -ge 8 ]]; then break; fi
if [ $i -ge 8 ]; then break; fi
i=$((i+1))
if [ -z "$t" ] ; then
head=$(git show -s --format=%H HEAD)
last=$(git show -s --format=%H "$o")
if [[ $head == $last ]]; then
if [ "$head" = "$last" ]; then
t="$o"
continue
fi
Expand All @@ -28,7 +29,7 @@ for o in $(git tag --sort=-creatordate) ""; do
title="Release ${PACKAGE}${PACKAGE:+-}$version released $date"
under=$(echo "$title"|sed 's,.,-,g')
cmd="git shortlog -e -n -w80,6,8 ${o}${o:+...}${t}"
echo -e "\n$title\n$under\n\n$cmd\n\n$(eval $cmd)\n"
/usr/bin/echo -e "\n$title\n$under\n\n$cmd\n\n$(eval $cmd)\n"
t="$o"
done|sed -r 's,[[:space:]][[:space:]]*$,,'

0 comments on commit 04d2a55

Please sign in to comment.