-
Notifications
You must be signed in to change notification settings - Fork 8
/
bump-kernels
executable file
·50 lines (41 loc) · 1.13 KB
/
bump-kernels
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env bash
# bump dist-kernels
# (c) 2022-2024 Michał Górny <[email protected]>
# SPDX-License-Identifier: GPL-2.0-or-later
set -x -e
scriptdir=${BASH_SOURCE%/*}
cd "$(git rev-parse --show-toplevel)"
while [[ ${#} -gt 0 ]]; do
old=${1}
new=${2}
[[ ${old} && ${new} ]]
for pkg in {vanilla,gentoo}-kernel; do
(
cd sys-kernel/${pkg}
match=( *${pkg}-${old}*.ebuild )
newk=${pkg}-${new}.ebuild
cp "${match[-1]}" "${newk}"
ekeyword ~all "${newk}"
"${scriptdir}"/copybump "${newk}"
${EDITOR:-vim} "${newk}"
GENTOO_MIRRORS= ebuild "${newk}" manifest
# do verify-sig
if [[ ${pkg} == vanilla-kernel ]]; then
USE=verify-sig ebuild "${newk}" unpack
ebuild "${newk}" clean
fi
git add Manifest "${newk}"
"${scriptdir}"/pkgcommit -sS . -m "Bump to ${new}"
)
done
(
cd virtual/dist-kernel
cp dist-kernel-{${old},${new}}.ebuild
ekeyword ~all dist-kernel-${new}.ebuild
"${scriptdir}"/copybump dist-kernel-${new}.ebuild
git add dist-kernel-${new}.ebuild
"${scriptdir}"/pkgcommit -sS . -m "Bump to ${new}"
)
shift 2
done
git diff origin > ${BINPKG_DOCKER:-~/git/binpkg-docker}/local.diff