mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
armbian-next: fix all shellcheck errors in lib/
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user