]>
Commit | Line | Data |
---|---|---|
882632ce | 1 | #!/bin/sh |
605c5c3c | 2 | channels=" |
902a69a3 | 3 | bartlett.laurent-laville.org |
aec1d9a8 | 4 | components.ez.no |
a9af1509 | 5 | pear.docblox-project.org |
605c5c3c | 6 | pear.firephp.org |
2f9b87ec | 7 | pear.horde.org |
7e5dea50 | 8 | pear.indeyets.ru |
d92a3b44 | 9 | pear.michelf.com |
7a1a8238 | 10 | pear.netpirates.net |
f84845e8 | 11 | pear.pdepend.org |
605c5c3c ER |
12 | pear.phing.info |
13 | pear.phpdb.org | |
237c2312 | 14 | pear.phpdoc.org |
f84845e8 | 15 | pear.phpmd.org |
605c5c3c | 16 | pear.phpunit.de |
4c5242d9 | 17 | pear.propelorm.org |
605c5c3c | 18 | pear.roundcube.net |
aec1d9a8 | 19 | pear.symfony-project.com |
9eaeb4a8 | 20 | pear.symfony.com |
73b1fcbc | 21 | pear.twig-project.org |
aec1d9a8 | 22 | phpseclib.sourceforge.net |
d1682f5e | 23 | saucelabs.github.com/pear |
3ba22036 | 24 | zustellzentrum.cweiske.de |
882632ce | 25 | " |
db0d5279 ER |
26 | |
27 | fetch() { | |
28 | local url="$1" | |
29 | local target="$2" | |
30 | wget -q --timeout=10 --tries=1 ${target:+-O "$target"} "$url" | |
31 | } | |
32 | ||
7a1a8238 | 33 | for channel in ${@:-$channels}; do |
605c5c3c | 34 | url=http://$channel/channel.xml |
db0d5279 | 35 | fetch $url tmp.xml || continue |
882632ce | 36 | alias=$(sed -nre 's,.*<suggestedalias>(.+)</suggestedalias>.*$,\1,p' tmp.xml) |
5def8ed5 | 37 | sed -i -e 's,\r$,,g; s,\r,\n,g' tmp.xml |
882632ce | 38 | mv -f tmp.xml channel-$alias.xml |
db0d5279 ER |
39 | |
40 | url=http://$channel/feed.xml | |
41 | fetch $url tmp.xml || continue | |
42 | mv -f tmp.xml feed-$alias.xml | |
882632ce ER |
43 | done |
44 | ||
45 | rm -f tmp.xml |