diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2019-10-25 07:44:53 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2019-10-25 08:31:30 +0200 |
commit | 33dd955c08486e92a4f8156840b397104a7a76dd (patch) | |
tree | b3348ac8e8c5f294e8e92825482c6a8ab6ce4cad /bin | |
parent | 3f6045769751d11b7596643609f3ba1f9972f0ee (diff) | |
download | ptxdist-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')
-rwxr-xr-x | bin/ptxdist | 8 |
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 } # |