From: Chris Gianelloni Date: Mon, 2 Oct 2006 14:32:29 +0000 (+0000) Subject: Added patch from Alon Bar-Lev for bug #148498 and also a... X-Git-Tag: v3.4.10.902~307 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b931ed00a0bf09abecb96abdb1213ee7b2695cab;p=genkernel.git Added patch from Alon Bar-Lev for bug #148498 and also a patch from Robin H. Johnson to support git-based kernels. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@445 67a159dc-881f-0410-a524-ba9dfbe2cb84 --- diff --git a/gen_determineargs.sh b/gen_determineargs.sh index 11e94d6..fcafe33 100644 --- a/gen_determineargs.sh +++ b/gen_determineargs.sh @@ -38,9 +38,19 @@ get_KV() { cd ${KERNEL_DIR} #compile_generic prepare kernel > /dev/null 2>&1 cd - > /dev/null 2>&1 - if [ -f ${KERNEL_DIR}/include/linux/version.h ] + [ -f "${KERNEL_DIR}/include/linux/version.h" ] && \ + VERSION_SOURCE="${KERNEL_DIR}/include/linux/version.h" + [ -f "${KERNEL_DIR}/include/linux/utsrelease.h" ] && \ + VERSION_SOURCE="${KERNEL_DIR}/include/linux/utsrelease.h" + # Handle new-style releases where version.h doesn't have UTS_RELEASE + if [ -f ${KERNEL_DIR}/include/config/kernel.release ] then - UTS_RELEASE=`grep UTS_RELEASE ${KERNEL_DIR}/include/linux/version.h | sed -e 's/#define UTS_RELEASE "\(.*\)"/\1/'` + UTS_RELEASE=`cat ${KERNEL_DIR}/include/config/kernel.release` + LOV=`echo ${UTS_RELEASE}|sed -e "s/${VER}.${PAT}.${SUB}${EXV}//"` + KV=${VER}.${PAT}.${SUB}${EXV}${LOV} + elif [ -n "${VERSION_SOURCE}" ] + then + UTS_RELEASE=`grep UTS_RELEASE ${VERSION_SOURCE} | sed -e 's/#define UTS_RELEASE "\(.*\)"/\1/'` LOV=`echo ${UTS_RELEASE}|sed -e "s/${VER}.${PAT}.${SUB}${EXV}//"` KV=${VER}.${PAT}.${SUB}${EXV}${LOV} else