overlay/do-kernel-bump.sh

36 lines
1.6 KiB
Bash
Executable File

#!/bin/sh
if [ -z "$4" ]; then
echo do-kernel-bump.sh OLDVER NEWVER NAS_PATCHES_VER NAS_CONFIGS_VER
exit
fi
OLD=$1
NEW=$2
VER=$3
CNF=$4
PACKAGES="
sys-kernel/buffalo_ls_chl-sources sys-kernel/linux-buffalo_ls_chl \
sys-kernel/buffalo_ls_chl2-sources sys-kernel/linux-buffalo_ls_chl2 \
sys-kernel/buffalo_ls_hgl-sources sys-kernel/linux-buffalo_ls_hgl \
sys-kernel/buffalo_ls_live-sources sys-kernel/linux-buffalo_ls_live \
sys-kernel/buffalo_ls_mini-sources sys-kernel/linux-buffalo_ls_mini \
sys-kernel/buffalo_ls_pro-sources sys-kernel/linux-buffalo_ls_pro \
sys-kernel/buffalo_kb_pro-sources sys-kernel/linux-buffalo_kb_pro \
sys-kernel/buffalo_ls_pro_duo_rev1-sources sys-kernel/linux-buffalo_ls_pro_duo_rev1 \
sys-kernel/buffalo_ls_pro_duo_rev2-sources sys-kernel/linux-buffalo_ls_pro_duo_rev2 \
sys-kernel/buffalo_ls_ql-sources sys-kernel/linux-buffalo_ls_ql \
sys-kernel/buffalo_ls_vl-sources sys-kernel/linux-buffalo_ls_vl \
sys-kernel/buffalo_ls_xhl-sources sys-kernel/linux-buffalo_ls_xhl \
sys-kernel/linksys_nslu2-sources sys-kernel/linux-linksys_nslu2 \
sys-kernel/freescale_mx53_loco-sources sys-kernel/linux-freescale_mx53_loco \
"
for package in ${PACKAGES}; do
name=$(echo ${package} | cut -d/ -f2)
cp ${package}/${name}-${OLD}.ebuild ${package}/${name}-${OLD}.ebuild.old
sed -e "s:^K_NASPATCHES_VER=.*:K_NASPATCHES_VER=\"${VER}\":" -e "s:^K_NASCONFIGS_VER=.*:K_NASCONFIGS_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