1 | #!/bin/bash |
---|
2 | # |
---|
3 | # |
---|
4 | hostExpresso="www-expcomunidade-trunk" |
---|
5 | pathff=$HOME/.mozilla/firefox |
---|
6 | profiles=`cat ~/.mozilla/firefox/profiles.ini | grep 'Path=' | cut -c6-` |
---|
7 | for filez in $profiles |
---|
8 | do |
---|
9 | filel="$pathff/$filez/mimeTypes.rdf" |
---|
10 | filet='/tmp/mimeTypesT' |
---|
11 | filep='/tmp/mimeTypesP' |
---|
12 | |
---|
13 | touch $filet |
---|
14 | |
---|
15 | cat $filel | sed '/possibleApplication.*yahoo.*/a \<NC:possibleApplication RDF:resource="urn:handler:web:http://'$hostExpresso'/expressoMail1_2/index.php?to=%s"/>' > $filet |
---|
16 | |
---|
17 | echo -e "<RDF:Description RDF:about=\"urn:handler:web:http://$hostExpresso/expressoMail1_2/index.php?to=%s\" \ |
---|
18 | \n NC:prettyName=\"Expresso-Mail\" \ |
---|
19 | \n NC:uriTemplate=\"http://$hostExpresso/expressoMail1_2/index.php?to=%s\" /> \ |
---|
20 | \n <RDF:Description RDF:about=\"urn:scheme:externalApplication:mailto\" \ |
---|
21 | \n NC:prettyName=\"Expresso-Mail\" \ |
---|
22 | \n NC:uriTemplate=\"http://$hostExpresso/expressoMail1_2/index.php?to=%s\" /> " >> $filet |
---|
23 | |
---|
24 | cat $filet | sed '/<\/RDF:RDF>/d' > $filep |
---|
25 | |
---|
26 | echo "</RDF:RDF>" >> $filep |
---|
27 | |
---|
28 | echo "salvando em " $filel |
---|
29 | |
---|
30 | cat $filep > $filel |
---|
31 | done |
---|