diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2013-06-11 14:41:40 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2013-06-11 14:56:06 +0200 |
commit | 6c874d9b5f68b8b340f77679434cd92b3851c37e (patch) | |
tree | 420d5f28ecaa18605c827f7df1ce902b26bacfb8 | |
parent | f6fd936d813b64480a16cfa051089cb3e3c64b4d (diff) | |
download | ptxdist-6c874d9b5f68b8b340f77679434cd92b3851c37e.tar.gz ptxdist-6c874d9b5f68b8b340f77679434cd92b3851c37e.tar.xz |
ptxdist: also source ptxd_lib_*.sh from BSP and platform
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rwxr-xr-x | bin/ptxdist | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/bin/ptxdist b/bin/ptxdist index 9e1b88c3c..733d792cf 100755 --- a/bin/ptxdist +++ b/bin/ptxdist @@ -2294,9 +2294,23 @@ setup_platform() { # source more libs # setup_libs() { + local lib i + local -a dir + # check SCRIPTSDIR first because PTXDIST_PATH_SCRIPTS is set there for lib in "${SCRIPTSDIR}/lib/ptxd_lib_"*.sh; do source "${lib}" || ptxd_bailout "failed to source lib: ${lib}" done + ptxd_in_path PTXDIST_PATH_SCRIPTS || return + dir=( "${ptxd_reply[@]}" ) + for ((i=$((${#dir[@]}-1)); i>=0; i--)) do + if [ "${dir[${i}]}" = "${SCRIPTSDIR}" ]; then + continue + fi + ptxd_get_path "${dir[${i}]}/lib/ptxd_lib_"*.sh || continue + for lib in "${ptxd_reply[@]}"; do + source "${lib}" || ptxd_bailout "failed to source lib: ${lib}" + done + done } |