mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
Add lib/import-functions.sh to import functions
Note: build will fail on this commit
This commit is contained in:
@@ -27,15 +27,15 @@ if [[ "${ARMBIAN_ENABLE_CALL_TRACING}" == "yes" ]]; then
|
||||
trap 'echo "${BASH_LINENO[@]}|${BASH_SOURCE[@]}|${FUNCNAME[@]}" >> ${SRC}/output/debug/calls.txt ;' RETURN
|
||||
fi
|
||||
|
||||
if [[ -f "${SRC}"/lib/general.sh ]]; then
|
||||
if [[ -f "${SRC}"/lib/import-functions.sh ]]; then
|
||||
|
||||
# Declare this folder as safe
|
||||
if ! grep -q 2>/dev/null "directory = \*" "$HOME/.gitconfig"; then
|
||||
git config --global --add safe.directory "*"
|
||||
fi
|
||||
|
||||
# shellcheck source=lib/general.sh
|
||||
source "${SRC}"/lib/general.sh
|
||||
# shellcheck source=lib/import-functions.sh
|
||||
source "${SRC}"/lib/import-functions.sh
|
||||
|
||||
else
|
||||
|
||||
|
||||
6
lib/import-functions.sh
Normal file
6
lib/import-functions.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
while read -r file; do
|
||||
# shellcheck source=/dev/null
|
||||
source "$file"
|
||||
done <<<"$(find "${SRC}/lib/functions" -name "*.sh")"
|
||||
@@ -61,6 +61,8 @@ backtitle="Armbian building script, https://www.armbian.com | https://docs.armbi
|
||||
[[ -z $CONSOLE_CHAR ]] && export CONSOLE_CHAR="UTF-8" # set console to UTF-8 if not set
|
||||
|
||||
# Libraries include
|
||||
# shellcheck source=import-functions.sh
|
||||
source "${SRC}/lib/import-functions.sh"
|
||||
|
||||
# shellcheck source=debootstrap.sh
|
||||
source "${SRC}"/lib/debootstrap.sh # system specific install
|
||||
|
||||
Reference in New Issue
Block a user