summaryrefslogtreecommitdiff
path: root/source/k/build-all-kernels.sh
diff options
context:
space:
mode:
Diffstat (limited to 'source/k/build-all-kernels.sh')
-rwxr-xr-xsource/k/build-all-kernels.sh30
1 files changed, 25 insertions, 5 deletions
diff --git a/source/k/build-all-kernels.sh b/source/k/build-all-kernels.sh
index 5d1d5daa..561b8e32 100755
--- a/source/k/build-all-kernels.sh
+++ b/source/k/build-all-kernels.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2018, 2021 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -108,7 +108,12 @@ for recipe in $RECIPES ; do
)
KERNEL_HUGE_PACKAGE_NAME=$(PRINT_PACKAGE_NAME=YES KERNEL_NAME=huge KERNEL_SOURCE=$TMP/package-kernel-source/usr/src/linux KERNEL_CONFIG=./kernel-configs/config-huge${LOCALVERSION}-${VERSION}${LOCALVERSION}${CONFIG_SUFFIX} CONFIG_SUFFIX=${CONFIG_SUFFIX} KERNEL_OUTPUT_DIRECTORY=$OUTPUT/kernels/huge$(echo ${LOCALVERSION} | tr -d -).s BUILD=$BUILD ./kernel-generic.SlackBuild)
KERNEL_NAME=huge KERNEL_SOURCE=$TMP/package-kernel-source/usr/src/linux KERNEL_CONFIG=./kernel-configs/config-huge${LOCALVERSION}-${VERSION}${LOCALVERSION}${CONFIG_SUFFIX} CONFIG_SUFFIX=${CONFIG_SUFFIX} KERNEL_OUTPUT_DIRECTORY=$OUTPUT/kernels/huge$(echo ${LOCALVERSION} | tr -d -).s BUILD=$BUILD ./kernel-generic.SlackBuild
- mv ${TMP}/${KERNEL_HUGE_PACKAGE_NAME} $OUTPUT || exit 1
+ if [ -r ${TMP}/${KERNEL_HUGE_PACKAGE_NAME} ]; then
+ mv ${TMP}/${KERNEL_HUGE_PACKAGE_NAME} $OUTPUT
+ else
+ echo "kernel-source build failed."
+ exit 1
+ fi
if [ "${INSTALL_PACKAGES}" = "YES" ]; then
installpkg ${OUTPUT}/${KERNEL_HUGE_PACKAGE_NAME} || exit 1
fi
@@ -116,7 +121,12 @@ for recipe in $RECIPES ; do
# Build kernel-generic package:
KERNEL_GENERIC_PACKAGE_NAME=$(PRINT_PACKAGE_NAME=YES KERNEL_NAME=generic KERNEL_SOURCE=$TMP/package-kernel-source/usr/src/linux KERNEL_CONFIG=./kernel-configs/config-generic${LOCALVERSION}-${VERSION}${LOCALVERSION}${CONFIG_SUFFIX} CONFIG_SUFFIX=${CONFIG_SUFFIX} KERNEL_OUTPUT_DIRECTORY=$OUTPUT/kernels/generic$(echo ${LOCALVERSION} | tr -d -).s BUILD=$BUILD ./kernel-generic.SlackBuild)
KERNEL_NAME=generic KERNEL_SOURCE=$TMP/package-kernel-source/usr/src/linux KERNEL_CONFIG=./kernel-configs/config-generic${LOCALVERSION}-${VERSION}${LOCALVERSION}${CONFIG_SUFFIX} CONFIG_SUFFIX=${CONFIG_SUFFIX} KERNEL_OUTPUT_DIRECTORY=$OUTPUT/kernels/generic$(echo ${LOCALVERSION} | tr -d -).s BUILD=$BUILD ./kernel-generic.SlackBuild
- mv ${TMP}/${KERNEL_GENERIC_PACKAGE_NAME} $OUTPUT || exit 1
+ if [ -r ${TMP}/${KERNEL_GENERIC_PACKAGE_NAME} ]; then
+ mv ${TMP}/${KERNEL_GENERIC_PACKAGE_NAME} $OUTPUT
+ else
+ echo "kernel-generic build failed."
+ exit 1
+ fi
if [ "${INSTALL_PACKAGES}" = "YES" ]; then
installpkg ${OUTPUT}/${KERNEL_GENERIC_PACKAGE_NAME} || exit 1
fi
@@ -125,7 +135,12 @@ for recipe in $RECIPES ; do
# will also work with the huge kernel):
KERNEL_MODULES_PACKAGE_NAME=$(PRINT_PACKAGE_NAME=YES KERNEL_SOURCE=$TMP/package-kernel-source/usr/src/linux KERNEL_CONFIG=$TMP/package-kernel-source/usr/src/linux/.config BUILD=$BUILD ./kernel-modules.SlackBuild)
KERNEL_SOURCE=$TMP/package-kernel-source/usr/src/linux KERNEL_CONFIG=$TMP/package-kernel-source/usr/src/linux/.config BUILD=$BUILD ./kernel-modules.SlackBuild
- mv ${TMP}/${KERNEL_MODULES_PACKAGE_NAME} $OUTPUT || exit 1
+ if [ -r ${TMP}/${KERNEL_MODULES_PACKAGE_NAME} ]; then
+ mv ${TMP}/${KERNEL_MODULES_PACKAGE_NAME} $OUTPUT
+ else
+ echo "kernel-modules build failed."
+ exit 1
+ fi
if [ "${INSTALL_PACKAGES}" = "YES" ]; then
installpkg ${OUTPUT}/${KERNEL_MODULES_PACKAGE_NAME} || exit 1
fi
@@ -133,7 +148,12 @@ for recipe in $RECIPES ; do
# Build kernel-headers:
KERNEL_HEADERS_PACKAGE_NAME=$(PRINT_PACKAGE_NAME=YES KERNEL_SOURCE=$TMP/package-kernel-source/usr/src/linux BUILD=$BUILD ./kernel-headers.SlackBuild)
KERNEL_SOURCE=$TMP/package-kernel-source/usr/src/linux BUILD=$BUILD ./kernel-headers.SlackBuild
- mv ${TMP}/${KERNEL_HEADERS_PACKAGE_NAME} $OUTPUT || exit 1
+ if [ -r ${TMP}/${KERNEL_HEADERS_PACKAGE_NAME} ]; then
+ mv ${TMP}/${KERNEL_HEADERS_PACKAGE_NAME} $OUTPUT
+ else
+ echo "kernel-headers build failed."
+ exit 1
+ fi
if [ "${INSTALL_PACKAGES}" = "YES" ]; then
upgradepkg --reinstall --install-new ${OUTPUT}/${KERNEL_HEADERS_PACKAGE_NAME} || exit 1
fi