[packages/rpm-build-tools] pear: allow updating by channel
glen
glen at pld-linux.org
Sun Nov 23 01:09:41 CET 2014
commit 6f2cd35c1bfa340c763f614dbffc2e3bd0f0bcd3
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sun Nov 23 02:06:55 2014 +0200
pear: allow updating by channel
pear-autoup.sh | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/pear-autoup.sh b/pear-autoup.sh
index 5e3000b..7348a05 100755
--- a/pear-autoup.sh
+++ b/pear-autoup.sh
@@ -14,6 +14,10 @@ if [ "$1" = "clean" ]; then
exit 0
fi
+if [ $# -gt 0 ]; then
+ echo "$*" | tr ' ' '\n' > pear.channels
+fi
+
# test that php is working
php -r 'echo "PHP is working OK\n";'
@@ -43,9 +47,12 @@ rpm -q php-packagexml2cl php-pear-PEAR_Command_Packaging
[ -s pear.upgrades ] || pear list-upgrades > pear.upgrades
# process urls to aliases
-[ -s pear.rpms ] || pear list-channels | sed -ne '4,$p' | while read url alias desc; do
- awk -vurl="$url" -valias="$alias" '$1 == url {printf("php-%s-%s %s\n", alias, $2, $5)}' pear.upgrades
-done > pear.rpms
+[ -s pear.rpms ] || {
+ [ -s pear.channels ] || pear list-channels | sed -ne '4,$p' > pear.channels
+ while read url alias desc; do
+ awk -vurl="$url" -valias="$alias" '$1 == url {printf("php-%s-%s %s\n", alias, $2, $5)}' pear.upgrades
+ done < pear.channels > pear.rpms
+}
# clear it if you do not want to upgrade pkgs. i.e bring ac to sync
do_upgrade=1
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/8600d6745ce156506833260ff06d0dee8656c9e2
More information about the pld-cvs-commit
mailing list