summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2018-10-03 13:27:42 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2018-10-03 14:17:55 +0200
commitb652350522ec5c7402c4cb9b610cb405b732763e (patch)
treef0d795517ddaeb3107ff0de053a832898b1152f2 /bin
parent1851a9f58b21c40e170acc64cabcefb60699736a (diff)
downloadptxdist-b652350522ec5c7402c4cb9b610cb405b732763e.tar.gz
ptxdist-b652350522ec5c7402c4cb9b610cb405b732763e.tar.xz
ptxdist: make sure PTXDIST_PTXCONFIG/PTXDIST_PLATFORMCONFIG are never empty
Before the introduction of layers, these variables referred to the nonexistent selected_* link if no config was selected of found. The corresponding error handling rely on the behaviour. Restore this behaviour to get the correct error message. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ptxdist2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/ptxdist b/bin/ptxdist
index d0d381481..fd3258a49 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -1359,6 +1359,7 @@ setup_layers()
if [ "${PTX_ptxconfig_SET}" = "false" ]; then
local -a cfgs=( "selected_ptxconfig" "configs/ptxconfig" )
+ PTXDIST_PTXCONFIG="${PTXDIST_LAYERS[0]}/${cfgs[0]}"
for layer in "${PTXDIST_LAYERS[@]}"; do
local -a ptxd_reply
ptxd_get_path "${cfgs[@]/#/${layer}/}" || continue
@@ -1369,6 +1370,7 @@ setup_layers()
if [ "${PTX_platformconfig_SET}" = "false" ]; then
local -a cfgs=( "selected_platformconfig" "configs/*/platformconfig" )
+ PTXDIST_PLATFORMCONFIG="${PTXDIST_LAYERS[0]}/${cfgs[0]}"
for layer in "${PTXDIST_LAYERS[@]}"; do
local tmp=( ${cfgs[@]/#/${layer}/} )
if [ "${#tmp[@]}" -gt 2 ]; then