summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorMartin.Jansa <Martin.Jansa@gmail.com>2009-10-30 10:54:49 +0100
committerMartin Jansa <Martin.Jansa@gmail.com>2009-12-22 13:17:38 +0100
commited6e69eab041535e3e3bc65bf804f7de346dc9f1 (patch)
tree79f63e2a6b5b3ddabc3d07c7552e4386f64c82c2 /contrib
parent3c41cbca07a89f13b01c869d40f6c097232b8646 (diff)
contrib: scripts for easy preferred-xorg-versions generation
* live.sh generates conf/distro/include/preferred-xorg-versions-live.inc with latest versions available at http://xorg.freedesktop.org/releases/individual/ * 7.5.sh generates preferred-xorg-versions-X11R7.5-live.inc with latest versions available at http://www.x.org/releases/X11R7.5/src/ * Temporary files are created in script directory and contains info about possible version updates, missing recipes (in "date".log) and also generated shell commands for copying recipe from older version etc (in "date".cmd).
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/source-checker/bump.preferred-xorg-versions-7.5.sh75
-rwxr-xr-xcontrib/source-checker/bump.preferred-xorg-versions-live.sh75
2 files changed, 150 insertions, 0 deletions
diff --git a/contrib/source-checker/bump.preferred-xorg-versions-7.5.sh b/contrib/source-checker/bump.preferred-xorg-versions-7.5.sh
new file mode 100755
index 0000000000..07fa914ee2
--- /dev/null
+++ b/contrib/source-checker/bump.preferred-xorg-versions-7.5.sh
@@ -0,0 +1,75 @@
+#!/bin/bash
+DATE=`date +%Y%m%d`
+SCRDIR=`dirname $0`
+DIR=${SCRDIR}/${DATE}
+PREFIX=http://www.x.org/releases/X11R7.5/src/
+GRPS="app data doc driver font lib proto util xserver"
+OETREE=${SCRDIR}/../..
+PREFS_LIVE=${OETREE}/conf/distro/include/preferred-xorg-versions-X11R7.5-live.inc
+BBS=${OETREE}/recipes/xorg-
+OUT_LOG=${DIR}.log
+OUT_CMD=${DIR}.cmd
+
+export LC_ALL=c
+
+mkdir -p ${DIR}
+
+function latest {
+ IN=$1
+ OUT=$2
+ echo "Parsing latest from ${IN} to ${OUT}"
+ sed "s/<a href=\"/\nPKG=/g" ${IN} | grep "^PKG=" | sed "s/^\([^\"]*\)\">.*$/\1/g" | grep "bz2$" | sort -V > ${IN}.tmp
+ for PKG in `sed "s/^\(.*\)-\([^-]*\)$/\1/g" ${IN}.tmp | sort -u`; do
+ grep ${PKG} ${IN}.tmp | tail -n 1 | sed 's/xorg-server/xserver-xorg/g' >> ${OUT};
+ done
+}
+
+function updateVersions {
+ PKG=$1
+ GRP=$2
+ VER=$3
+ 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`
+ #echo ${GRP}/${PKG}/${VER} ${PREF_VER} ${BB_VER}
+ if ls -1 ${BBS}${GRP}/${PKG}_*.bb >/dev/null 2>/dev/null ; then
+ echo "PREFERRED_VERSION_${PKG} ?= \"${VER}\"" >> ${PREFS_LIVE}
+ fi
+ if [[ -n ${BB_VER} && ${BB_VER} != ${VER} ]] ; then
+ echo "bump: $GRP ${PKG} ${BB_VER} -> ${VER}" | tee -a ${OUT_LOG}
+ echo "cp ${BBS}${GRP}/${PKG}_${BB_VER}.bb ${BBS}${GRP}/${PKG}_${VER}.bb" >> ${OUT_CMD}
+ fi
+ if [[ -z ${BB_VER} ]] ; then
+ echo "new ${GRP} ${PKG}/${VER}" | tee -a ${OUT_LOG}
+ fi
+}
+
+for GRP in ${GRPS}; do
+ if [[ ! -e ${DIR}/${GRP}.html ]] ; then
+ wget ${PREFIX}/${GRP} -O ${DIR}/${GRP}.html
+ fi
+ latest ${DIR}/${GRP}.html ${DIR}/${GRP}.txt
+ echo "#${GRP}" >> ${DIR}/latest.txt
+ sed "s/PKG=/${GRP}\//g; s/-\([^-]*\).tar.bz2$/\/\1/g;" ${DIR}/${GRP}.txt | gawk '{ print tolower($0) }' >> ${DIR}/latest.txt
+done
+
+sort -u ${DIR}/latest.txt > ${DIR}/latest.sort.txt
+
+echo "#`date`" > ${PREFS_LIVE}
+
+echo "#`date`" > ${OUT_LOG}
+echo "#`date`" > ${OUT_CMD}
+
+cat ${DIR}/latest.txt | while read LINE; do
+ if [[ ${LINE} =~ \#.* ]]; then
+ echo ${LINE} >> ${PREFS_LIVE}
+ continue
+ fi
+ #echo ${LINE};
+ PKG=`echo ${LINE} | sed "s%^\(.*\)\/\(.*\)\/\(.*\)$%\2%g;"`
+ GRP=`echo ${LINE} | sed "s%^\(.*\)\/\(.*\)\/\(.*\)$%\1%g;"`
+ VER=`echo ${LINE} | sed "s%^\(.*\)\/\(.*\)\/\(.*\)$%\3%g;"`
+ updateVersions ${PKG} ${GRP} ${VER}
+ updateVersions ${PKG}-native ${GRP} ${VER}
+done
+
+echo "Check ${OUT_LOG} if there is something new and interesting"
+echo "You can update prefs or copy bbfiles with commands from ${OUT_CMD}"
diff --git a/contrib/source-checker/bump.preferred-xorg-versions-live.sh b/contrib/source-checker/bump.preferred-xorg-versions-live.sh
new file mode 100755
index 0000000000..63ae0f4b28
--- /dev/null
+++ b/contrib/source-checker/bump.preferred-xorg-versions-live.sh
@@ -0,0 +1,75 @@
+#!/bin/bash
+DATE=`date +%Y%m%d`
+SCRDIR=`dirname $0`
+DIR=${SCRDIR}/${DATE}
+PREFIX=http://xorg.freedesktop.org/releases/individual/
+GRPS="app data doc driver font lib proto util xserver"
+OETREE=${SCRDIR}/../..
+PREFS_LIVE=${OETREE}/conf/distro/include/preferred-xorg-versions-live.inc
+BBS=${OETREE}/recipes/xorg-
+OUT_LOG=${DIR}.log
+OUT_CMD=${DIR}.cmd
+
+export LC_ALL=c
+
+mkdir -p ${DIR}
+
+function latest {
+ IN=$1
+ OUT=$2
+ echo "Parsing latest from ${IN} to ${OUT}"
+ sed "s/<a href=\"/\nPKG=/g" ${IN} | grep "^PKG=" | sed "s/^\([^\"]*\)\">.*$/\1/g" | grep "bz2$" | sort -V > ${IN}.tmp
+ for PKG in `sed "s/^\(.*\)-\([^-]*\)$/\1/g" ${IN}.tmp | sort -u`; do
+ grep ${PKG} ${IN}.tmp | tail -n 1 | sed 's/xorg-server/xserver-xorg/g' >> ${OUT};
+ done
+}
+
+function updateVersions {
+ PKG=$1
+ GRP=$2
+ VER=$3
+ 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`
+ #echo ${GRP}/${PKG}/${VER} ${PREF_VER} ${BB_VER}
+ if ls -1 ${BBS}${GRP}/${PKG}_*.bb >/dev/null 2>/dev/null ; then
+ echo "PREFERRED_VERSION_${PKG} ?= \"${VER}\"" >> ${PREFS_LIVE}
+ fi
+ if [[ -n ${BB_VER} && ${BB_VER} != ${VER} ]] ; then
+ echo "bump: $GRP ${PKG} ${BB_VER} -> ${VER}" | tee -a ${OUT_LOG}
+ echo "cp ${BBS}${GRP}/${PKG}_${BB_VER}.bb ${BBS}${GRP}/${PKG}_${VER}.bb" >> ${OUT_CMD}
+ fi
+ if [[ -z ${BB_VER} ]] ; then
+ echo "new ${GRP} ${PKG}/${VER}" | tee -a ${OUT_LOG}
+ fi
+}
+
+for GRP in ${GRPS}; do
+ if [[ ! -e ${DIR}/${GRP}.html ]] ; then
+ wget ${PREFIX}/${GRP} -O ${DIR}/${GRP}.html
+ fi
+ latest ${DIR}/${GRP}.html ${DIR}/${GRP}.txt
+ echo "#${GRP}" >> ${DIR}/latest.txt
+ sed "s/PKG=/${GRP}\//g; s/-\([^-]*\).tar.bz2$/\/\1/g;" ${DIR}/${GRP}.txt | gawk '{ print tolower($0) }' >> ${DIR}/latest.txt
+done
+
+sort -u ${DIR}/latest.txt > ${DIR}/latest.sort.txt
+
+echo "#`date`" > ${PREFS_LIVE}
+
+echo "#`date`" > ${OUT_LOG}
+echo "#`date`" > ${OUT_CMD}
+
+cat ${DIR}/latest.txt | while read LINE; do
+ if [[ ${LINE} =~ \#.* ]]; then
+ echo ${LINE} >> ${PREFS_LIVE}
+ continue
+ fi
+ #echo ${LINE};
+ PKG=`echo ${LINE} | sed "s%^\(.*\)\/\(.*\)\/\(.*\)$%\2%g;"`
+ GRP=`echo ${LINE} | sed "s%^\(.*\)\/\(.*\)\/\(.*\)$%\1%g;"`
+ VER=`echo ${LINE} | sed "s%^\(.*\)\/\(.*\)\/\(.*\)$%\3%g;"`
+ updateVersions ${PKG} ${GRP} ${VER}
+ updateVersions ${PKG}-native ${GRP} ${VER}
+done
+
+echo "Check ${OUT_LOG} if there is something new and interesting"
+echo "You can update prefs or copy bbfiles with commands from ${OUT_CMD}"