diff options
author | B. Watson <yalhcru@gmail.com> | 2020-06-10 19:42:04 -0400 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2020-06-10 19:42:04 -0400 |
commit | c3238e690a1f3254d282623e047f0124206de9b9 (patch) | |
tree | aad4069d37a258d2d641fef67abd7a3317fde111 /sbonewmaint | |
parent | fdab64c728d172419b3cc3f8a566a3fd134ab366 (diff) | |
download | sbostuff-c3238e690a1f3254d282623e047f0124206de9b9.tar.gz |
cleanup, wip for eventual release
Diffstat (limited to 'sbonewmaint')
-rwxr-xr-x | sbonewmaint | 38 |
1 files changed, 38 insertions, 0 deletions
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'" |