#!/bin/sh # Change maintainer field in a bunch of ports # # Johannes Winkelmann, jw@smts.ch DEFAULT_MAINT="unmaintained, maintainer-wanted at crux dot nu" # $1 = basedir, $2 = port name replace_maintainer() { if [ ! -d $1/$2 ]; then echo "Port $1/$2 not found" exit 1 fi if [ ! -f $1/$2/Pkgfile ]; then echo "$1/$2/Pkgfile not found" exit 1 fi # add -i to sed line to really replace the maintainer sed -e "s|#\s*Maintainer:\(\s*\).*|# Maintainer:\1$DEFAULT_MAINT|" \ $1/$2/Pkgfile } if [ -z "$2" ]; then echo "Usage: `basename $0` [ ...]" exit 0 fi dir=$1 shift for port in $*; do replace_maintainer $dir $port done