summaryrefslogtreecommitdiffstats
path: root/scripts/lib
diff options
context:
space:
mode:
authorAlexander Dahl <ada@thorsis.com>2024-05-06 12:50:49 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2024-05-09 11:39:01 +0200
commit0eea7080662b36cd39f03a3b0785d0e4a1c346bc (patch)
treebf681d920bd94a45af36c5457fe1bf1527428e6b /scripts/lib
parent33fa14b8b788e2d57d015c91c4c758708824a05d (diff)
downloadptxdist-0eea7080662b36cd39f03a3b0785d0e4a1c346bc.tar.gz
ptxdist-0eea7080662b36cd39f03a3b0785d0e4a1c346bc.tar.xz
ptxd_make_world_inject: Use <PKG>_DIR directly
pkg_source was defined as "$($(1)_DIR)" which is the same as pkg_dir in ptxd_make_world_common. We can use pkg_dir directly. Add a safe-guard to bail out early if that var is empty. Signed-off-by: Alexander Dahl <ada@thorsis.com> Acked-by: Michael Riesch <michael.riesch@wolfvision.net> Message-Id: <20240506105051.323546-3-ada@thorsis.com> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/ptxd_make_world_inject.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/lib/ptxd_make_world_inject.sh b/scripts/lib/ptxd_make_world_inject.sh
index 5c2d0dc5f..b74e464c6 100644
--- a/scripts/lib/ptxd_make_world_inject.sh
+++ b/scripts/lib/ptxd_make_world_inject.sh
@@ -10,7 +10,7 @@ ptxd_make_inject() {
local source target
source="$(echo ${inject_file} | cut -d ":" -f 1)"
- target="${pkg_source}/$(echo ${inject_file} | cut -d ":" -f 2)"
+ target="${pkg_dir}/$(echo ${inject_file} | cut -d ":" -f 2)"
if [[ "${source}" =~ ^/.* ]]; then
ptxd_bailout "'${source}' must not be an absolute path!" \
@@ -32,6 +32,10 @@ export -f ptxd_make_inject
ptxd_make_world_inject() {
ptxd_make_world_init || return
+ if [ -z "${pkg_dir}" ]; then
+ ptxd_bailout "<PKG>_DIR empty, no destination to inject to."
+ fi
+
for inject_file in ${pkg_inject_files}; do
ptxd_make_inject || return
done