#!/bin/bash # Strip cat, we only need the pkg name peclpkg="`echo ${1} | sed -e "s|^.*/||g"`" # Take care of some strange package naming peclpkg="${peclpkg/pecl-http/pecl_http}" peclpkg="${peclpkg/pecl-/}" peclpkg="${peclpkg/pdo-/pdo_}" # Take care of outputting the version number pwd="`pwd`" if ! test -d "${pwd}/${peclpkg}-tmp" ; then mkdir "${pwd}/${peclpkg}-tmp" fi cd "${pwd}/${peclpkg}-tmp" wget --quiet --tries=1 --timeout=3 "http://pecl.php.net/feeds/pkg_${peclpkg}.rss" grep -i title pkg_${peclpkg}.rss | sed -e "s|