Advertising
- Mine
- Saturday, January 13th, 2007 at 3:13:42pm UTC
- #!/bin/bash
- #update-maintainer
- #small - thus not perfect - script to update maintainer field in ubuntu packages
- #this code is under the GNU GPL V2 licence
- [ -n "`head -n 1 debian/changelog | grep -E "\(*ubuntu.*\)"`" ] && \
- [ -z "`grep -E "^Maintainer: .*ubuntu\.com>" debian/control`" ] && \
- section=$(apt-cache madison `head -n 1 debian/changelog | cut -d' ' -f1` | \
- grep Sources | head -n 1 | sed -r "s/.* (http|ftp).* (.*) Sources.*/\2/" | \
- cut -d'/' -f2)
- [ -z "$section" ] && echo "Not an ubuntu package or already maintained by the ubuntu team" &>2 && exit 1
- case $section in
- "main") email="Ubuntu Core Developers <ubuntu\[email protected]\.ubuntu\.com>" ;;
- "restricted") email="Ubuntu Core Developers <ubuntu\[email protected]\.ubuntu\.com>" ;;
- "universe") email="Ubuntu MOTU Developers <ubuntu\[email protected]\.ubuntu\.com>" ;;
- "multiverse") email="Ubuntu MOTU Developers <ubuntu\[email protected]\.ubuntu\.com>" ;;
- *) echo "Wrong section $section" && exit 1 ;;
- esac
- sed -ri "s/(^Maintainer:) (.*)/\1 $email\nOriginal-\1 \2/" debian/control
- echo "Maintainer changed to $email"
- exit 0
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will not expire by default. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.