armbian-next: extensions: move 'extensions.sh' into library; replace manual source with init function

- wraps globals in `extension_manager_declare_globals()` -- and make them actually global
- whoever wrote this original code is insane, add copyright
This commit is contained in:
Ricardo Pardini
2023-01-21 05:15:19 +01:00
parent 092f9ad3b2
commit eb30aac310
5 changed files with 39 additions and 22 deletions

View File

@@ -469,6 +469,15 @@ set -o errexit ## set -e : exit the script if any statement returns a non-true
# shellcheck source=lib/functions/general/downloads.sh
source "${SRC}"/lib/functions/general/downloads.sh
# no errors tolerated. invoked before each sourced file to make sure.
#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
set -o errtrace # trace ERR through - enabled
set -o errexit ## set -e : exit the script if any statement returns a non-true return value - enabled
### lib/functions/general/extensions.sh
# shellcheck source=lib/functions/general/extensions.sh
source "${SRC}"/lib/functions/general/extensions.sh
# no errors tolerated. invoked before each sourced file to make sure.
#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