commit: ccb86d0e5727b6428abe92ff93929e0c737ad0bd
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 28 19:25:40 2019 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Mar 28 19:25:40 2019 +0000
URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=ccb86d0e
set_kernel_arch(): error out if VER, SUB or PAT is not defined
If VER, SUB or PAT is not defined for some reason, bad things will happen.
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
gen_arch.sh | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gen_arch.sh b/gen_arch.sh
index 1c9ec37..4ced125 100755
--- a/gen_arch.sh
+++ b/gen_arch.sh
@@ -48,6 +48,10 @@ get_official_arch() {
}
set_kernel_arch() {
+ [ -z "${VER}" ] && gen_die "cannot set KERNEL_ARCH without VER!"
+ [ -z "${SUB}" ] && gen_die "cannot set KERNEL_ARCH without SUB!"
+ [ -z "${PAT}" ] && gen_die "cannot set KERNEL_ARCH without PAT!"
+
KERNEL_ARCH=${ARCH}
case ${ARCH} in
ppc|ppc64*)