blob: b7f6a0ca3bee2d12500949b8a0b3dd56edc669ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#!/bin/bash
# Strip cat, we only need the pkg name
fmpkg="`echo ${1} | sed -e "s|^.*/||g"`"
# Take care of outputting the version number
pwd="`pwd`"
if ! test -d "${pwd}/${fmpkg}-tmp" ; then
mkdir "${pwd}/${fmpkg}-tmp"
fi
cd "${pwd}/${fmpkg}-tmp"
wget --quiet --tries=1 --timeout=3 "http://freshmeat.net/projects-xml/${fmpkg}/${fmpkg}.xml"
grep -i 'latest_release_version' ${fmpkg}.xml | sed -e "s|^.*<latest_release_version>||g" | sed -e "s|</latest_release_version>.*||g" | sed -e "s|^[A-Za-z _-]*||g" | sed -e "s|-[cCe-oE-OqQs-zS-Z]\{1\}.*||g"
rm -Rf "${pwd}/${fmpkg}-tmp"
|