5 PREFIX=http://xorg.freedesktop.org/releases/individual/
6 GRPS="app data doc driver font lib proto util xserver"
8 PREFS_LIVE=${OETREE}/conf/distro/include/preferred-xorg-versions-live.inc
9 BBS=${OETREE}/recipes/xorg-
20 echo "Parsing latest from ${IN} to ${OUT}"
21 sed "s/<a href=\"/\nPKG=/g" ${IN} | grep "^PKG=" | sed "s/^\([^\"]*\)\">.*$/\1/g" | grep "bz2$" | sort -V > ${IN}.tmp
22 for PKG in `sed "s/^\(.*\)-\([^-]*\)$/\1/g" ${IN}.tmp | sort -u`; do
23 grep ${PKG} ${IN}.tmp | tail -n 1 | sed 's/xorg-server/xserver-xorg/g' >> ${OUT};
27 function updateVersions {
31 BB_VER=`ls -1 ${BBS}${GRP}/${PKG}_*.bb 2>/dev/null | sed "s%${BBS}${GRP}/${PKG}_%%g; s%.bb$%%g" | grep -v X11R7.0 | grep -v cvs | grep -v git | grep -v svn | sort -V | tail -n 1`
32 #echo ${GRP}/${PKG}/${VER} ${PREF_VER} ${BB_VER}
33 echo "PREFERRED_VERSION_${PKG} ?= \"${VER}\"" >> ${PREFS_LIVE}
34 if [[ -n ${BB_VER} && ${BB_VER} != ${VER} ]] ; then
35 echo "bump: $GRP ${PKG} ${BB_VER} -> ${VER}" | tee -a ${OUT_LOG}
36 echo "cp ${BBS}${GRP}/${PKG}_${BB_VER}.bb ${BBS}${GRP}/${PKG}_${VER}.bb" >> ${OUT_CMD}
38 if [[ -z ${BB_VER} ]] ; then
39 echo "new ${GRP} ${PKG}/${VER}" | tee -a ${OUT_LOG}
43 for GRP in ${GRPS}; do
44 if [[ ! -e ${DIR}/${GRP}.html ]] ; then
45 wget http://xorg.freedesktop.org/releases/individual/${GRP} -O ${DIR}/${GRP}.html
47 latest ${DIR}/${GRP}.html ${DIR}/${GRP}.txt
48 sed "s/PKG=/${GRP}\//g; s/-\([^-]*\).tar.bz2$/\/\1/g;" ${DIR}/${GRP}.txt | gawk '{ print tolower($0) }' >> ${DIR}/latest.txt
51 sort -u ${DIR}/latest.txt > ${DIR}/latest.sort.txt
53 echo "#`date`" > ${PREFS_LIVE}
55 echo "#`date`" > ${OUT_LOG}
56 echo "#`date`" > ${OUT_CMD}
58 cat ${DIR}/latest.sort.txt | while read LINE; do
60 PKG=`echo ${LINE} | sed "s%^\(.*\)\/\(.*\)\/\(.*\)$%\2%g;"`
61 GRP=`echo ${LINE} | sed "s%^\(.*\)\/\(.*\)\/\(.*\)$%\1%g;"`
62 VER=`echo ${LINE} | sed "s%^\(.*\)\/\(.*\)\/\(.*\)$%\3%g;"`
63 updateVersions ${PKG} ${GRP} ${VER}
64 updateVersions ${PKG}-native ${GRP} ${VER}
67 echo "Check ${OUT_LOG} if there is something new and interesting"
68 echo "You can update prefs or copy bbfiles with commands from ${OUT_CMD}"