-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathbump-kernels-bin
More file actions
executable file
·45 lines (37 loc) · 1.04 KB
/
bump-kernels-bin
File metadata and controls
executable file
·45 lines (37 loc) · 1.04 KB
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
#!/usr/bin/env bash
# bump dist-kernels -bin variants
# (c) 2022-2024 Michał Górny <mgorny@gentoo.org>
# SPDX-License-Identifier: GPL-2.0-or-later
set -x -e
scriptdir=${BASH_SOURCE%/*}
distdir=$(portageq distdir)
cd "$(git rev-parse --show-toplevel)"
while [[ ${#} -gt 0 ]]; do
old=${1}
new=${2}
[[ ${old} && ${new} ]]
for pkg in gentoo-kernel-bin; do
for arch in amd64 arm64 ppc64le x86; do
match=(
${BINPKG:-~/binpkg}/${arch}/kernel/sys-kernel/${pkg%-bin}/${pkg%-bin}-${new}*.gpkg.tar
)
[[ ${#match[@]} -eq 1 ]]
fn=${match##*/}
cp "${match}" "${distdir}/${fn/.gpkg.tar/.${arch}.gpkg.tar}"
done
(
cd sys-kernel/${pkg}
match=( *${pkg}-${old}.ebuild )
newk=${pkg}-${new}.ebuild
cp "${match[-1]}" "${newk}"
ekeyword ~all "${newk}"
"${scriptdir}"/copybump "${newk}"
sed -i -e "s:^\(SHA256SUM_DATE=\).*:\1$(date +%Y%m%d):" "${newk}"
${EDITOR:-vim} "${newk}"
GENTOO_MIRRORS= ebuild "${newk}" manifest
git add Manifest "${newk}"
"${scriptdir}"/pkgcommit -sS . -m "Bump to ${new}"
)
done
shift 2
done