mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
armbian-next: shellcheck: squash more shellcheck warnings; some long-lost variables being used; some unset's that are better reset's, etc
This commit is contained in:
@@ -15,6 +15,6 @@ function post_install_kernel_debs__build_nvidia_kernel_module() {
|
||||
# chroot_sdcard_apt_get_install() is in lib/logging/runners.sh which handles "running" of stuff nicely.
|
||||
# chroot_sdcard_apt_get_install() -> chroot_sdcard_apt_get() -> chroot_sdcard() -> run_host_command_logged_raw()
|
||||
# it handles bash-specific quoting issues, apt proxies, logging, and errors.
|
||||
declare -agx if_error_find_files_sdcard=("/var/lib/dkms/nvidia/*/build/make.log")
|
||||
declare -ag if_error_find_files_sdcard=("/var/lib/dkms/nvidia/*/build/make.log")
|
||||
chroot_sdcard_apt_get_install "nvidia-dkms-${NVIDIA_DRIVER_VERSION}" "nvidia-driver-${NVIDIA_DRIVER_VERSION}" nvidia-settings
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ function extension_finish_config__build_zfs_kernel_module() {
|
||||
function post_install_kernel_debs__build_zfs_kernel_module() {
|
||||
[[ "${INSTALL_HEADERS}" != "yes" ]] || [[ "${KERNEL_HAS_WORKING_HEADERS}" != "yes" ]] && return 0
|
||||
display_alert "Install ZFS packages, will build kernel module in chroot" "${EXTENSION}" "info"
|
||||
declare -agx if_error_find_files_sdcard=("/var/lib/dkms/zfs/*/build/*.log")
|
||||
declare -ag if_error_find_files_sdcard=("/var/lib/dkms/zfs/*/build/*.log")
|
||||
# See https://github.com/zfsonlinux/pkg-zfs/issues/69 for a bug with leaking env vars.
|
||||
use_clean_environment="yes" chroot_sdcard_apt_get_install "zfs-dkms zfsutils-linux"
|
||||
}
|
||||
|
||||
@@ -295,7 +295,7 @@ function compile_uboot() {
|
||||
display_alert "Extensions: custom uboot built by extension" "not building regular uboot" "debug"
|
||||
fi
|
||||
|
||||
display_alert "Preparing u-boot general packaging. all_worked:${all_worked} any_worked:${any_worked} " "${version} ${target_make}"
|
||||
display_alert "Preparing u-boot general packaging" "${version} ${target_make}"
|
||||
|
||||
# set up postinstall script # @todo: extract into a tinkerboard extension
|
||||
if [[ $BOARD == tinkerboard ]]; then
|
||||
|
||||
@@ -113,7 +113,7 @@ function interactive_desktop_main_configuration() {
|
||||
options+=("${config_filename}" "${config_name} configuration")
|
||||
done
|
||||
|
||||
dialog_menu "Choose the desktop environment config" "$backtitle" "Select the configuration for this environment.\nThese are sourced from ${desktop_environment_config_dir}" "${options[@]}"
|
||||
dialog_menu "Choose the desktop environment config" "$backtitle" "Select the configuration for this environment." "${options[@]}"
|
||||
DESKTOP_ENVIRONMENT_CONFIG_NAME="${DIALOG_MENU_RESULT}"
|
||||
unset options
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ function run_host_command_logged_raw() {
|
||||
function logging_clear_run_command_error_info() {
|
||||
# Unset those globals; they're only valid for the first invocation of a runner helper function after they're set.
|
||||
unset if_error_detail_message
|
||||
unset if_error_find_files_sdcard # remember, this is global.
|
||||
declare -ag if_error_find_files_sdcard=() # declare as global, empty array
|
||||
}
|
||||
|
||||
function logging_enrich_run_command_error_info() {
|
||||
|
||||
@@ -272,7 +272,7 @@ function config_post_main() {
|
||||
function set_distribution_status() {
|
||||
local distro_support_desc_filepath="${SRC}/config/distributions/${RELEASE}/support"
|
||||
if [[ ! -f "${distro_support_desc_filepath}" ]]; then
|
||||
exit_with_error "Distribution ${distribution_name} does not exist"
|
||||
exit_with_error "Distribution dir '${distro_support_desc_filepath}' does not exist"
|
||||
else
|
||||
DISTRIBUTION_STATUS="$(cat "${distro_support_desc_filepath}")"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user