Automatic proxy configuration for KDE (cont.)

Andy Teijelo Pérez ateijelo at uh.cu
Thu Jul 14 01:39:07 BST 2005


El Miércoles, 13 de Julio de 2005 3:40, Kevin Krammer escribió:
> A brute force method would be
>
> ----------
> #!/bin/bash
>
> APPS=$(dcop)
>
> for app in $APPS; do
>     dcop $app KIO::Scheduler reparseSlaveConfiguration http;
> done;
> ---------
Well, I did something like that, only "bruter" (is that a word?):

-----------------------------------------------------------
#!/bin/bash

dcop | while read i
       do
           #echo "i: $i"
           objs="$(dcop $i)"
           for o in $objs
           do
               #echo "o: $o"
               if [ $o == "KIO::Scheduler" ]
               then
                   dcop $i $o reparseSlaveConfiguration http
               fi
           done
       done
-----------------------------------------------------------

I didn't realize that a simple error message like
"object not accessible" does no harm, and reduces the execution time from 
O(n^2) to O(n).

Well, the hack is already working. Thanks.

Saludos,
Andy.
___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.




More information about the kde mailing list