mirror of https://github.com/armbian/build.git
shellfmt/.editorconfig: enable trim whitespaces, run shellfmt, no actual code changes (#4849)
- shellfmt: bump to 3.6.0 (run with `bash lib/tools/shellfmt.sh`) - .editorconfig: rationalize, remove duplicated logic
This commit is contained in:
parent
c2004faf9c
commit
2f7423d0e4
|
|
@ -8,9 +8,12 @@ charset = utf-8
|
|||
end_of_line = lf
|
||||
indent_style = tab
|
||||
indent_size = 8
|
||||
trim_trailing_whitespace = false
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.patch]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.md]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
|
@ -19,12 +22,9 @@ insert_final_newline = false
|
|||
[*.json]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
trim_trailing_whitespace = false
|
||||
insert_final_newline = true
|
||||
|
||||
# Custom Armbian formatting for bash sources and configuration
|
||||
[*.{sh,inc,conf,eos,wip,tvb,csc}]
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
shell_variant = bash
|
||||
binary_next_line = false
|
||||
|
|
@ -33,18 +33,11 @@ space_redirects = true
|
|||
keep_padding = false
|
||||
function_next_line = false
|
||||
|
||||
# C coding style based on Linux kernel.
|
||||
# https://www.kernel.org/doc/html/v5.0/process/coding-style.html
|
||||
|
||||
[*.c]
|
||||
indent_style = tab
|
||||
indent_size = 8
|
||||
|
||||
[*.h]
|
||||
indent_style = tab
|
||||
indent_size = 8
|
||||
|
||||
[*.{yaml,yml}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
insert_final_newline = false
|
||||
|
||||
[*.py]
|
||||
indent_size = 4
|
||||
max_line_length = 150
|
||||
|
|
|
|||
|
|
@ -13,4 +13,3 @@ case "${BRANCH}" in
|
|||
esac
|
||||
|
||||
KERNELPATCHDIR="archive/starfive-${KERNEL_MAJOR_MINOR}" # Don't use symlinks.
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ function extension_prepare_config__prepare_flash_kernel() {
|
|||
export BOOTSIZE=0 # No separate /boot, flash-kernel will "flash" the kernel+initrd to the firmware part.
|
||||
export UEFI_MOUNT_POINT="/boot/firmware" # mount uefi partition at /boot/firmware
|
||||
export CLOUD_INIT_CONFIG_LOCATION="/boot/firmware" # use /boot/firmware for cloud-init as well
|
||||
export IMAGE_INSTALLED_KERNEL_VERSION="${FK__PUBLISHED_KERNEL_VERSION}" # For the VERSION
|
||||
export IMAGE_INSTALLED_KERNEL_VERSION="${FK__PUBLISHED_KERNEL_VERSION}" # For the VERSION
|
||||
export EXTRA_BSP_NAME="${EXTRA_BSP_NAME}-fk${FK__PUBLISHED_KERNEL_VERSION}" # Unique bsp name.
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ function download_git_kernel_bundle() {
|
|||
return 0
|
||||
}
|
||||
|
||||
|
||||
function kernel_download_bundle_with_axel() {
|
||||
display_alert "Downloading Kernel bundle" "${bundle_type}; this might take a long time" "info"
|
||||
declare -a verbose_params=()
|
||||
|
|
|
|||
|
|
@ -10,8 +10,7 @@ function driver_generic_bring_back_ipx() {
|
|||
fi
|
||||
}
|
||||
|
||||
driver_rtl8152_rtl8153()
|
||||
{
|
||||
driver_rtl8152_rtl8153() {
|
||||
# Updated USB network drivers for RTL8152/RTL8153 based dongles that also support 2.5Gbs variants
|
||||
if linux-version compare "${version}" ge 5.4 && linux-version compare "${version}" le 5.12 && [ "$LINUXFAMILY" != mvebu64 ] && [ "$LINUXFAMILY" != rk322x ] && [ "$LINUXFAMILY" != odroidxu4 ] && [ "$EXTRAWIFI" == yes ]; then
|
||||
|
||||
|
|
@ -26,8 +25,7 @@ driver_rtl8152_rtl8153()
|
|||
fi
|
||||
}
|
||||
|
||||
driver_rtl8189ES()
|
||||
{
|
||||
driver_rtl8189ES() {
|
||||
# Wireless drivers for Realtek 8189ES chipsets
|
||||
|
||||
if linux-version compare "${version}" ge 3.14 && [ "$EXTRAWIFI" == yes ]; then
|
||||
|
|
@ -66,9 +64,7 @@ driver_rtl8189ES()
|
|||
fi
|
||||
}
|
||||
|
||||
driver_rtl8189FS()
|
||||
{
|
||||
|
||||
driver_rtl8189FS() {
|
||||
|
||||
# Wireless drivers for Realtek 8189FS chipsets
|
||||
|
||||
|
|
@ -109,8 +105,7 @@ driver_rtl8189FS()
|
|||
|
||||
}
|
||||
|
||||
driver_rtl8192EU()
|
||||
{
|
||||
driver_rtl8192EU() {
|
||||
|
||||
# Wireless drivers for Realtek 8192EU chipsets
|
||||
|
||||
|
|
@ -149,8 +144,7 @@ driver_rtl8192EU()
|
|||
fi
|
||||
}
|
||||
|
||||
driver_rtl8811_rtl8812_rtl8814_rtl8821()
|
||||
{
|
||||
driver_rtl8811_rtl8812_rtl8814_rtl8821() {
|
||||
|
||||
# Wireless drivers for Realtek 8811, 8812, 8814 and 8821 chipsets
|
||||
|
||||
|
|
@ -185,8 +179,7 @@ driver_rtl8811_rtl8812_rtl8814_rtl8821()
|
|||
|
||||
}
|
||||
|
||||
driver_xradio_xr819()
|
||||
{
|
||||
driver_xradio_xr819() {
|
||||
|
||||
# Wireless drivers for Xradio XR819 chipsets
|
||||
if linux-version compare "${version}" ge 4.19 && linux-version compare "${version}" le 5.19 &&
|
||||
|
|
@ -228,8 +221,7 @@ driver_xradio_xr819()
|
|||
|
||||
}
|
||||
|
||||
driver_rtl8811CU_rtl8821C()
|
||||
{
|
||||
driver_rtl8811CU_rtl8821C() {
|
||||
# Wireless drivers for Realtek RTL8811CU and RTL8821C chipsets
|
||||
|
||||
if linux-version compare "${version}" ge 3.14 && [ "$EXTRAWIFI" == yes ]; then
|
||||
|
|
@ -276,8 +268,7 @@ driver_rtl8811CU_rtl8821C()
|
|||
|
||||
}
|
||||
|
||||
driver_rtl8188EU_rtl8188ETV()
|
||||
{
|
||||
driver_rtl8188EU_rtl8188ETV() {
|
||||
|
||||
# Wireless drivers for Realtek 8188EU 8188EUS and 8188ETV chipsets
|
||||
|
||||
|
|
@ -326,8 +317,7 @@ driver_rtl8188EU_rtl8188ETV()
|
|||
fi
|
||||
}
|
||||
|
||||
driver_rtl88x2bu()
|
||||
{
|
||||
driver_rtl88x2bu() {
|
||||
|
||||
# Wireless drivers for Realtek 88x2bu chipsets
|
||||
|
||||
|
|
@ -371,12 +361,11 @@ driver_rtl88x2bu()
|
|||
|
||||
}
|
||||
|
||||
driver_rtl88x2cs()
|
||||
{
|
||||
driver_rtl88x2cs() {
|
||||
|
||||
# Wireless drivers for Realtek 88x2cs chipsets
|
||||
|
||||
if linux-version compare "${version}" ge 5.9 && [ "$EXTRAWIFI" == yes ] ; then
|
||||
if linux-version compare "${version}" ge 5.9 && [ "$EXTRAWIFI" == yes ]; then
|
||||
|
||||
# attach to specifics tag or branch
|
||||
local rtl88x2csver="branch:tune_for_jethub"
|
||||
|
|
@ -417,8 +406,7 @@ driver_rtl88x2cs()
|
|||
fi
|
||||
}
|
||||
#_bt for blueteeth
|
||||
driver_rtl8822cs_bt()
|
||||
{
|
||||
driver_rtl8822cs_bt() {
|
||||
# Bluetooth support for Realtek 8822CS (hci_ver 0x8) chipsets
|
||||
# For sunxi, these two patches are applied in a series.
|
||||
if linux-version compare "${version}" ge 5.11 && [[ "$LINUXFAMILY" != sunxi* ]]; then
|
||||
|
|
@ -431,8 +419,7 @@ driver_rtl8822cs_bt()
|
|||
fi
|
||||
}
|
||||
|
||||
driver_rtl8723DS()
|
||||
{
|
||||
driver_rtl8723DS() {
|
||||
# Wireless drivers for Realtek 8723DS chipsets
|
||||
|
||||
if linux-version compare "${version}" ge 5.0 && [[ "$EXTRAWIFI" == yes ]]; then
|
||||
|
|
@ -474,8 +461,7 @@ driver_rtl8723DS()
|
|||
fi
|
||||
}
|
||||
|
||||
driver_rtl8723DU()
|
||||
{
|
||||
driver_rtl8723DU() {
|
||||
|
||||
# Wireless drivers for Realtek 8723DU chipsets
|
||||
|
||||
|
|
@ -514,8 +500,7 @@ driver_rtl8723DU()
|
|||
fi
|
||||
}
|
||||
|
||||
driver_rtl8822BS()
|
||||
{
|
||||
driver_rtl8822BS() {
|
||||
# Wireless drivers for Realtek 8822BS chipsets
|
||||
|
||||
if linux-version compare "${version}" ge 4.4 && linux-version compare "${version}" le 5.16 && [ "$EXTRAWIFI" == yes ]; then
|
||||
|
|
@ -555,8 +540,7 @@ driver_rtl8822BS()
|
|||
|
||||
}
|
||||
|
||||
driver_uwe5622_allwinner()
|
||||
{
|
||||
driver_uwe5622_allwinner() {
|
||||
# Unisoc uwe5622 wireless Support
|
||||
if linux-version compare "${version}" ge 4.4 && linux-version compare "${version}" le 6.2 && [[ "$LINUXFAMILY" == sunxi* || "$LINUXFAMILY" == rockchip64 ]]; then
|
||||
display_alert "Adding" "Drivers for Unisoc uwe5622 found on some Allwinner and Rockchip boards" "info"
|
||||
|
|
@ -565,8 +549,8 @@ driver_uwe5622_allwinner()
|
|||
process_patch_file "${SRC}/patch/misc/wireless-driver-for-uwe5622-allwinner-bugfix.patch" "applying"
|
||||
process_patch_file "${SRC}/patch/misc/wireless-driver-for-uwe5622-warnings.patch" "applying"
|
||||
|
||||
# Add to section Makefile
|
||||
echo "obj-\$(CONFIG_SPARD_WLAN_SUPPORT) += uwe5622/" >> "$kerneldir/drivers/net/wireless/Makefile"
|
||||
# Add to section Makefile
|
||||
echo "obj-\$(CONFIG_SPARD_WLAN_SUPPORT) += uwe5622/" >> "$kerneldir/drivers/net/wireless/Makefile"
|
||||
|
||||
if linux-version compare "${version}" lt 6.1; then
|
||||
process_patch_file "${SRC}/patch/misc/wireless-driver-for-uwe5622-park-link-pre-v6.1.patch" "applying"
|
||||
|
|
@ -579,8 +563,7 @@ driver_uwe5622_allwinner()
|
|||
fi
|
||||
}
|
||||
|
||||
patch_drivers_network()
|
||||
{
|
||||
patch_drivers_network() {
|
||||
display_alert "Patching network related drivers"
|
||||
|
||||
driver_generic_bring_back_ipx
|
||||
|
|
|
|||
|
|
@ -181,7 +181,6 @@ function prepare_extra_kernel_drivers() {
|
|||
if linux-version compare "${version}" ge 5.15.41 && linux-version compare "${version}" le 5.16; then aufstag="5.15.41"; fi
|
||||
if linux-version compare "${version}" ge 5.17.3 && linux-version compare "${version}" le 5.18; then aufstag="5.17.3"; fi
|
||||
|
||||
|
||||
# check if Mr. Okajima already made a branch for this version
|
||||
improved_git ls-remote --exit-code --heads $GITHUB_SOURCE/sfjro/aufs5-standalone "aufs${aufstag}" > /dev/null
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Management of apt-cacher-ng aka acng
|
||||
|
||||
function acng_configure_and_restart_acng() {
|
||||
if ! armbian_is_host_running_systemd; then return 0; fi # do nothing if host is not running systemd
|
||||
[[ "${MANAGE_ACNG}" != "yes" ]] && return 0 # don't if told not to. NO_something=yes is very confusing, but kept for historical reasons
|
||||
if ! armbian_is_host_running_systemd; then return 0; fi # do nothing if host is not running systemd
|
||||
[[ "${MANAGE_ACNG}" != "yes" ]] && return 0 # don't if told not to. NO_something=yes is very confusing, but kept for historical reasons
|
||||
|
||||
display_alert "Preparing acng configuration" "apt-cacher-ng" "info"
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ function acng_configure_and_restart_acng() {
|
|||
}
|
||||
|
||||
function acng_check_status_or_restart() {
|
||||
[[ "${MANAGE_ACNG}" != "yes" ]] && return 0 # don't if told not to
|
||||
[[ "${MANAGE_ACNG}" != "yes" ]] && return 0 # don't if told not to
|
||||
|
||||
if ! systemctl -q is-active apt-cacher-ng.service; then
|
||||
display_alert "ACNG systemd service is not active" "restarting apt-cacher-ng" "warn"
|
||||
|
|
|
|||
|
|
@ -186,4 +186,3 @@ function exit_with_error() {
|
|||
|
||||
exit 43
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,4 +24,3 @@ function config_possibly_interactive_branch_release_desktop_minimal() {
|
|||
|
||||
return 0 # protect against eventual shortcircuit above
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1045,7 +1045,6 @@ set -o errexit ## set -e : exit the script if any statement returns a non-true
|
|||
# shellcheck source=lib/functions/rootfs/trap-rootfs.sh
|
||||
source "${SRC}"/lib/functions/rootfs/trap-rootfs.sh
|
||||
|
||||
|
||||
# no errors tolerated. one last time for the win!
|
||||
#set -o pipefail # trace ERR through pipes - will be enabled "soon"
|
||||
#set -o nounset ## set -u : exit the script if you try to use an uninitialised variable - one day will be enabled
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
SHELLFMT_VERSION=${SHELLFMT_VERSION:-3.5.1} # https://github.com/mvdan/sh/releases/
|
||||
SHELLFMT_VERSION=${SHELLFMT_VERSION:-3.6.0} # https://github.com/mvdan/sh/releases/
|
||||
|
||||
SRC="$(
|
||||
cd "$(dirname "$0")/../.."
|
||||
|
|
|
|||
Loading…
Reference in New Issue