scripts/check_kernel_config: handle string options

This commit is contained in:
Lukas Rusak
2022-05-03 14:43:50 -07:00
parent d546803ae4
commit 4af06750d7
2 changed files with 7 additions and 1 deletions

@ -179,7 +179,7 @@ pre_make_target() {
continue
fi
if [ "$(${PKG_BUILD}/scripts/config --state ${OPTION%%=*})" != "${OPTION##*=}" ]; then
if [ "$(${PKG_BUILD}/scripts/config --state ${OPTION%%=*})" != "$(echo ${OPTION##*=} | tr -d '"')" ]; then
MISSING_KERNEL_OPTIONS+="\t${OPTION}\n"
fi
done < ${DISTRO_DIR}/${DISTRO}/kernel_options

@ -26,6 +26,12 @@ if [ -f "${DISTRO_DIR}/${DISTRO}/kernel_options" ]; then
$PKG_BUILD/scripts/config --file $PKG_KERNEL_CFG_FILE --disable ${OPTION%%=*}
fi
# must be a string if it contains double quotes
if [ -n "$(echo ${OPTION##*=} | grep '"')" ]; then
echo "[${OPTION##*=}] ${OPTION%%=*}"
$PKG_BUILD/scripts/config --file $PKG_KERNEL_CFG_FILE --set-str ${OPTION%%=*} $(echo ${OPTION##*=} | tr -d '"')
fi
done < ${DISTRO_DIR}/${DISTRO}/kernel_options
else
echo "kernel options file doesn't exist: ${DISTRO_DIR}/${DISTRO}/kernel_options"