blob: 8ed386bc7902245c21993caadf3ecdb823c5036e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/bin/bash
# Strip cat, we only need the pkg name
berpkg="`echo ${1} | sed -e "s|^.*/||g"`"
# Take care of outputting the version number
pwd="`pwd`"
if ! test -d "${pwd}/${berpkg}-tmp" ; then
mkdir "${pwd}/${berpkg}-tmp"
fi
cd "${pwd}/${berpkg}-tmp"
wget --quiet --tries=1 --timeout=3 "http://developer.berlios.de/projects/${berpkg}/" -O indexfile
projnum=`grep -i 'project/filelist.php?group_id' indexfile | sed -e "s|^.*<A .*group_id=||g" | sed -e "s|\">.*||g"`
wget --quiet --tries=1 --timeout=3 "http://developer.berlios.de/export/rss20_bsnewreleases.php?group_id=${projnum}" -O rssfeed
grep -i "<title>${berpkg} " rssfeed | head -n 1 | sed -e "s|^.*<title>${berpkg} ||gI" | sed -e "s|</title>.*||g" | sed -e "s|^[A-Za-z _-]*||g" | sed -e "s|-[cCe-oE-OqQs-zS-Z]\{1\}.*||g"
rm -Rf "${pwd}/${berpkg}-tmp"
|