#!/bin/sh # # This script gives developer permissions (canconfirm+editbugs) to an *existing* bugzilla account # # Requirements: you must have editusers permissions in bugzilla # and you must have the bugzilla cookie available (i.e. already logged in) # # Author: David Faure # License: Public domain # if [ $# -ne 1 ]; then echo "Usage: $0 email" exit 1 fi email=$1 email_in_query=`echo $email | sed -e 's/@/%40/g'` url="http://bugs.kde.org/editusers.cgi?action=edit&user=$email_in_query" appid=`dcopstart konqueror "$url"` # dcopstart ensures konqueror is launched and ready, but not that tdehtml finished loading objid='' while test -z "$objid"; do # TODO: timeout? sleep 1 objid=`dcopfind $appid html-widget'*'` objid=`dcopobject $objid` if test "`dcop $appid $objid url`" != "$url"; then objid='' fi done dcop $appid $objid evalJS 'var f=document.forms[0];f.group_7.checked=true;f.group_6.checked=true;f.submit()'