mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
config-prepare: Initialize an empty KERNEL_DRIVERS_SKIP array unless it exists
If the array exists in this location, initializing an empty array will destroy all the data that was stored in it. Do not initialize an empty KERNEL_DRIVERS_SKIP array if it exists. This allows us to create an array anywhere in the script, including the user configuration, in a secure way.
This commit is contained in:
@@ -166,7 +166,11 @@ function config_early_init() {
|
||||
|
||||
display_alert "Starting single build process" "${BOARD:-"no BOARD set"}" "info"
|
||||
|
||||
declare -g -a KERNEL_DRIVERS_SKIP=() # Prepare array to be filled in by board/family/extensions
|
||||
# Do not initialize an empty array if it exists.
|
||||
if [ "${KERNEL_DRIVERS_SKIP[*]}" == "" ]; then
|
||||
# Prepare array to be filled in by board/family/extensions
|
||||
declare -g -a KERNEL_DRIVERS_SKIP=()
|
||||
fi
|
||||
|
||||
silent="yes" track_general_config_variables "after config_early_init" # don't log anything, just init the change tracking
|
||||
|
||||
|
||||
Reference in New Issue
Block a user