python-escpos/doc/generate_authors.sh

23 lines
607 B
Bash
Raw Normal View History

2017-05-25 23:55:30 +00:00
#!/bin/sh
2017-08-31 11:42:26 +00:00
GENLIST=$(git shortlog -s -n | cut -f2 | sort -f)
2020-05-26 19:29:16 +00:00
GENLIST_W_MAIL=$(git shortlog -s -e -n | cut -f2 | sort -f)
2017-05-25 23:55:30 +00:00
AUTHORSFILE="$(dirname $0)/../AUTHORS"
TEMPAUTHORSFILE="/tmp/python-escpos-authorsfile"
if [ "$#" -eq 1 ]
then
echo "$GENLIST">$TEMPAUTHORSFILE
2017-06-19 11:13:39 +00:00
echo "\nAuthorsfile in version control:\n"
cat $AUTHORSFILE
echo "\nNew authorsfile:\n"
cat $TEMPAUTHORSFILE
echo "\nUsing diff on files...\n"
2020-05-26 19:29:16 +00:00
diff --suppress-common-lines -b --from-file $AUTHORSFILE $TEMPAUTHORSFILE
echo "Authors with mail addresses:\n"
echo "$GENLIST_W_MAIL"
2017-05-25 23:55:30 +00:00
else
echo "$GENLIST">$AUTHORSFILE
fi