[packages/php-pear] fetch also feeds (don't remember why anymore)

glen glen at pld-linux.org
Sun Apr 19 14:02:47 CEST 2015


commit db0d5279d766d0add399919d5f1ab0415eeda476
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sun Apr 19 14:57:06 2015 +0300

    fetch also feeds (don't remember why anymore)

 update-channels.sh | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
---
diff --git a/update-channels.sh b/update-channels.sh
index 27bd5f4..a1bc4b7 100755
--- a/update-channels.sh
+++ b/update-channels.sh
@@ -22,12 +22,23 @@ channels="
 	saucelabs.github.com/pear
 	zustellzentrum.cweiske.de
 "
+
+fetch() {
+	local url="$1"
+	local target="$2"
+	wget -q --timeout=10 --tries=1 ${target:+-O "$target"} "$url"
+}
+
 for channel in ${@:-$channels}; do
 	url=http://$channel/channel.xml
-	wget -q --timeout=10 --tries=1 -O tmp.xml $url || continue
+	fetch $url tmp.xml  || continue
 	alias=$(sed -nre 's,.*<suggestedalias>(.+)</suggestedalias>.*$,\1,p' tmp.xml)
 	sed -i -e 's,\r$,,g; s,\r,\n,g' tmp.xml
 	mv -f tmp.xml channel-$alias.xml
+
+	url=http://$channel/feed.xml
+	fetch $url tmp.xml  || continue
+	mv -f tmp.xml feed-$alias.xml
 done
 
 rm -f tmp.xml
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php-pear.git/commitdiff/902a69a381b9803dd410e8f5f307c8f397bf5dfc



More information about the pld-cvs-commit mailing list