summaryrefslogtreecommitdiffstats
path: root/bin/ptxdist
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-10-25 07:44:53 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-10-25 08:31:30 +0200
commit33dd955c08486e92a4f8156840b397104a7a76dd (patch)
treeb3348ac8e8c5f294e8e92825482c6a8ab6ce4cad /bin/ptxdist
parent3f6045769751d11b7596643609f3ba1f9972f0ee (diff)
downloadptxdist-33dd955c08486e92a4f8156840b397104a7a76dd.tar.gz
ptxdist-33dd955c08486e92a4f8156840b397104a7a76dd.tar.xz
ptxdist: _get_config_ptx: make sure configfile_version is always defined
It may be used outside the function, so check PTXDIST_FORCE only on failure. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'bin/ptxdist')
-rwxr-xr-xbin/ptxdist8
1 files changed, 3 insertions, 5 deletions
diff --git a/bin/ptxdist b/bin/ptxdist
index 727a5e16a..09fbd3bef 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -248,11 +248,9 @@ _get_config_ptx() {
return 1
fi
- if [ -n "${PTXDIST_FORCE}" ]; then
- return
- fi
- configfile_version="$(ptxd_get_ptxconf PTXCONF_CONFIGFILE_VERSION)" || {
+ configfile_version="$(ptxd_get_ptxconf PTXCONF_CONFIGFILE_VERSION)"
+ if [ $? -ne 0 -a -n "${PTXDIST_FORCE}" ]; then
ptxd_dialog_msgbox \
"error: the config file '${PTXDIST_PTXCONFIG#${PTXDIST_WORKSPACE}/}'\n" \
" is missing the symbol 'PTXCONF_CONFIGFILE_VERSION',\n" \
@@ -260,7 +258,7 @@ _get_config_ptx() {
"\n" \
" Try 'ptxdist select <ptxconfig>'\n"
return 1
- }
+ fi
}
#