summaryrefslogtreecommitdiffstats
path: root/bin/ptxdist
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2014-02-23 17:45:32 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2014-02-25 09:02:57 +0100
commit9f8e963a2c63a2ec840410cadc52701d1085ff7b (patch)
tree4645ee90a9b470550fe51bd4bcf4a119e7eb8b50 /bin/ptxdist
parente9b63339f6377df5d15feb4bd0685bb49a675593 (diff)
downloadptxdist-9f8e963a2c63a2ec840410cadc52701d1085ff7b.tar.gz
ptxdist-9f8e963a2c63a2ec840410cadc52701d1085ff7b.tar.xz
ptxdist: don't create the logfile until the platformdir is verified
This way ptxdist won't create platform/logfile before the correct platformconfig is selected. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'bin/ptxdist')
-rwxr-xr-xbin/ptxdist7
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/ptxdist b/bin/ptxdist
index e432bfb01..9e58224c0 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -359,6 +359,7 @@ check_config() {
_check_config_platform &&
_check_config_collection
fi &&
+ setup_logfile &&
if [ ! -e "${PTXDIST_PLATFORMDIR}/selected_ptxconfig" -o -L "${PTXDIST_PLATFORMDIR}/selected_ptxconfig" ]; then
local ptxconfig="$(readlink -f "${PTXDIST_PTXCONFIG}")"
rm -f "${PTXDIST_PLATFORMDIR}/selected_ptxconfig" &&
@@ -1418,7 +1419,6 @@ do_select()
#
setup_platform &&
setup_path &&
- setup_logfile &&
setup_export
}
@@ -2363,6 +2363,7 @@ setup_path() {
#
setup_logfile()
{
+ PTX_LOGFILE="${PTXDIST_PLATFORMDIR}/logfile"
local logdir="${PTX_LOGFILE%/*}"
if [ -e "${logdir}" -a \! -w "${logdir}" -o \
@@ -2393,6 +2394,7 @@ setup_logfile()
# ||
# VV
echo "{""{{ $(date '+%FT%T%z') ${PTXDIST} ${PTXDIST_ARGS_FULL[@]}" >> "${PTX_LOGFILE}"
+ export PTX_LOGFILE
}
@@ -2467,9 +2469,6 @@ main() {
setup_path &&
# --- path is now set ---
- setup_logfile &&
- # -- logfile is ready
-
setup_export &&
# -- all important vars are exported