aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2015-10-28 18:09:47 -0700
committerAlexey Neyman <stilor@att.net>2015-10-30 16:24:52 -0700
commit1d6bed6254ac819ef7b6deb653053024311ec5be (patch)
tree315232c557749285abb379e04ec01827cee04ba8 /scripts
parenta9e6606e5351f69355edb72dc2b1ac84fd58e514 (diff)
downloadcrosstool-ng-1d6bed6254ac819ef7b6deb653053024311ec5be.tar.gz
crosstool-ng-1d6bed6254ac819ef7b6deb653053024311ec5be.tar.bz2
crosstool-ng-1d6bed6254ac819ef7b6deb653053024311ec5be.zip
Only create backtrace stamp if dir exists.
If the build is aborted before the working directory is created, there's also an induced error message about inability to create a 'backtrace' file. But in that case, there is no subshells executing yet. Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/functions2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/functions b/scripts/functions
index 86653465..91ec2171 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -14,7 +14,7 @@ CT_OnError() {
# To avoid printing the backtace for each sub-shell
# up to the top-level, just remember we've dumped it
if [ ! -f "${CT_WORK_DIR}/backtrace" ]; then
- touch "${CT_WORK_DIR}/backtrace"
+ [ -d "${CT_WORK_DIR}" ] && touch "${CT_WORK_DIR}/backtrace"
# Print steps backtrace
step_depth=${CT_STEP_COUNT}