From c3238e690a1f3254d282623e047f0124206de9b9 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 10 Jun 2020 19:42:04 -0400 Subject: cleanup, wip for eventual release --- sbonewmaint | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 sbonewmaint (limited to 'sbonewmaint') diff --git a/sbonewmaint b/sbonewmaint new file mode 100755 index 0000000..189bc23 --- /dev/null +++ b/sbonewmaint @@ -0,0 +1,38 @@ +#!/bin/sh + +if [ -e ~/.sbostuff.cfg ]; then + source ~/.sbostuff.cfg +else + echo "$( basename $0 ): warning: can't find ~/.sbostuff.cfg" +fi + +NAME="$1" +EMAIL="$2" + +if [ "$NAME" = "me" -a "$EMAIL" = "" ]; then + NAME="$SBO_NAME" + EMAIL="$SBO_EMAIL" +elif [ "$NAME" = "nobody" -o "$NAME" = "orphaned" ]; then + NAME="orphaned - no maintainer" + EMAIL="nobody@nowhere.com" +fi + +if [ "$NAME" = "" -o "$NAME" = "--help" -o "$EMAIL" = "" ]; then + echo "Usage: $( basename $0 ) 'Full Name' email@domain.com" 1>&2 + echo " $( basename $0 ) me" 1>&2 + echo " $( basename $0 ) nobody" 1>&2 + exit 1 +fi + +INFO="$( echo *.info )" +if [ ! -e "$INFO" ]; then + echo "No (or multiple) .info file in current dir" 1>&2 + exit 1 +fi + +sed -i "/^MAINTAINER=/s,\"[^\"]*\",\"$NAME\"," "$INFO" +sed -i "/^EMAIL=/s,\"[^\"]*\",\"$EMAIL\"," "$INFO" + +PAGER=cat git diff . + +echo "git commit -a -m'New maintainer'" -- cgit v1.2.3