armbian-next: fix all shellcheck errors in lib/

This commit is contained in:
Ricardo Pardini
2022-12-01 16:49:01 +01:00
parent fd043d707a
commit c2af130a94
4 changed files with 7 additions and 7 deletions

View File

@@ -275,7 +275,7 @@ create_board_package() {
# copy distribution support status
local releases=($(find ${SRC}/config/distributions -mindepth 1 -maxdepth 1 -type d))
for i in ${releases[@]}; do
for i in "${releases[@]}"; do
echo "$(echo $i | sed 's/.*\///')=$(cat $i/support)" >> "${destination}"/etc/armbian-distribution-status
done

View File

@@ -310,13 +310,13 @@ function chroot_build_packages() {
done
if [[ ${#built_ok[@]} -gt 0 ]]; then
display_alert "Following packages were built without errors" "" "info"
for p in ${built_ok[@]}; do
for p in "${built_ok[@]}"; do
display_alert "$p"
done
fi
if [[ ${#failed[@]} -gt 0 ]]; then
display_alert "Following packages failed to build" "" "wrn"
for p in ${failed[@]}; do
for p in "${failed[@]}"; do
display_alert "$p"
done
fi

View File

@@ -30,7 +30,7 @@ function download_external_toolchains() {
USE_TORRENT_STATUS=${USE_TORRENT}
USE_TORRENT="no"
for toolchain in ${toolchains[@]}; do
for toolchain in "${toolchains[@]}"; do
local toolchain_zip="${SRC}/cache/toolchain/${toolchain}"
local toolchain_dir="${toolchain_zip%.tar.*}"
if [[ ! -f "${toolchain_dir}/.download-complete" ]]; then
@@ -53,9 +53,9 @@ function download_external_toolchains() {
USE_TORRENT=${USE_TORRENT_STATUS}
local existing_dirs=($(ls -1 "${SRC}"/cache/toolchain))
for dir in ${existing_dirs[@]}; do
for dir in "${existing_dirs[@]}"; do
local found=no
for toolchain in ${toolchains[@]}; do
for toolchain in "${toolchains[@]}"; do
[[ $dir == ${toolchain%.tar.*} ]] && found=yes
done
if [[ $found == no ]]; then

View File

@@ -29,5 +29,5 @@ fi
# Libraries include. ONLY source files that contain ONLY functions here.
# shellcheck source=library-functions.sh
# shellcheck source=lib/library-functions.sh
source "${SRC}"/lib/library-functions.sh