overlay/armv5tel-do-kernel-bump.sh
2013-12-06 15:33:14 +01:00

46 lines
1.5 KiB
Bash
Executable File

#!/bin/sh
if [ -z "$4" ]; then
echo armv5tel-do-kernel-bump.sh OLDVER NEWVER NAS_PATCHES_VER NAS_CONFIGS_VER
exit
fi
OLD=$1
NEW=$2
VER=$3
CNF=$4
BASEDIR=$(dirname $0)
source $BASEDIR/armv5tel-kernels
sourcenames="sys-kernel/go-sources"
echo "Bump armv5tel kernels"
for package in ${PACKAGES}; do
name=$(echo ${package} | cut -d/ -f2)
sourcename=$(echo ${package} | grep sources)
echo "source pkg ${sourcename}"
sourcenames="${sourcenames} ${sourcename}"
cp ${package}/${name}-${OLD}.ebuild ${package}/${name}-${OLD}.ebuild.old
sed -e "s:^K_SABPATCHES_VER=.*:K_SABPATCHES_VER=\"${VER}\":" -e "s:^K_SABCONFIGS_VER=.*:K_SABCONFIGS_VER=\"${CNF}\":" ${package}/${name}-${OLD}.ebuild.old > ${package}/${name}-${NEW}.ebuild
rm -f ${package}/${name}-${OLD}.ebuild.old
git add ${package}/${name}-${NEW}.ebuild
ebuild ${package}/${name}-${NEW}.ebuild manifest
done
echo "but still add the armv6j source packages to the virtual"
source $BASEDIR/armv6j-kernels
for package in ${PACKAGES}; do
sourcename=$(echo ${package} | grep sources)
echo "source pkg ${sourcename}"
sourcenames="${sourcenames} ${sourcename}"
done
echo "but still add the armv7a source packages to the virtual"
source $BASEDIR/armv7a-kernels
for package in ${PACKAGES}; do
sourcename=$(echo ${package} | grep sources)
echo "source pkg ${sourcename}"
sourcenames="${sourcenames} ${sourcename}"
done
sed -e "s:^SABLINK_SOURCES=.*:SABLINK_SOURCES=\"${sourcenames}\":" -i virtual/linux-sources/linux-sources-0.ebuild
ebuild virtual/linux-sources/linux-sources-0.ebuild manifest