Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate

Advertising

Mine
Saturday, January 13th, 2007 at 3:13:42pm UTC 

  1. #!/bin/bash
  2. #update-maintainer
  3. #small - thus not perfect - script to update maintainer field in ubuntu packages
  4. #written and (c) 2007 by Albin Tonnerre <[email protected]> (Lutin)
  5. #this code is under the GNU GPL V2 licence
  6.  
  7. [ -n "`head -n 1 debian/changelog | grep -E "\(*ubuntu.*\)"`" ] && \
  8. [ -z "`grep -E "^Maintainer: .*ubuntu\.com>" debian/control`" ] && \
  9. section=$(apt-cache madison `head -n 1 debian/changelog | cut -d' ' -f1` | \
  10. grep Sources | head -n 1 | sed -r "s/.* (http|ftp).* (.*) Sources.*/\2/" | \
  11. cut -d'/' -f2)
  12.  
  13. [ -z "$section" ] && echo "Not an ubuntu package or already maintained by the ubuntu team" &>2 && exit 1
  14. case $section in
  15.     "main")         email="Ubuntu Core Developers <ubuntu\[email protected]\.ubuntu\.com>"  ;;
  16.     "restricted")   email="Ubuntu Core Developers <ubuntu\[email protected]\.ubuntu\.com>"  ;;
  17.     "universe")     email="Ubuntu MOTU Developers <ubuntu\[email protected]\.ubuntu\.com>"   ;;
  18.     "multiverse")   email="Ubuntu MOTU Developers <ubuntu\[email protected]\.ubuntu\.com>"   ;;
  19.     *)              echo "Wrong section $section" && exit 1                            ;;
  20. esac
  21. sed -ri "s/(^Maintainer:) (.*)/\1 $email\nOriginal-\1 \2/" debian/control
  22. echo "Maintainer changed to $email"
  23. 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.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



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.

comments powered by Disqus
worth-right