diff options
author | Nicolas Dechesne <nicolas.dechesne@linaro.org> | 2016-10-04 17:07:48 +0200 |
---|---|---|
committer | Nicolas Dechesne <nicolas.dechesne@linaro.org> | 2016-10-04 17:07:48 +0200 |
commit | 197fe7c557c7f719306602232b4d92d5afec1b02 (patch) | |
tree | cabe4044c06177ca85f1fbdf9528d5e4ded5403f /lt-qcom-debian-images-arm64 | |
parent | 8a66266c7d5fbd8befd5b895f1d72d03b7ce7bf4 (diff) |
lt-qcom-debian-images-arm64: fix cleanup scripts
In the previous rework of builders.sh , it was split into multiple subscripts,
so that we could reuse them. However the way the cleanup traps were done at the
end of the first subscripts, the entire workspace was wiped out, so the next
subscript failed. So let's defer the workspace cleanup until the last piece
(publishing), and only do early cleanup in case of failure.
Change-Id: I28de390a7a3e4768649680e974dc6456dab037e5
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Diffstat (limited to 'lt-qcom-debian-images-arm64')
-rw-r--r-- | lt-qcom-debian-images-arm64/builders.sh | 3 | ||||
-rw-r--r-- | lt-qcom-debian-images-arm64/installer-dragonboard-410c.sh | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lt-qcom-debian-images-arm64/builders.sh b/lt-qcom-debian-images-arm64/builders.sh index be0a419662..a565fe13d8 100644 --- a/lt-qcom-debian-images-arm64/builders.sh +++ b/lt-qcom-debian-images-arm64/builders.sh @@ -6,6 +6,9 @@ trap cleanup_exit INT TERM EXIT cleanup_exit() { + # cleanup here, only in case of error in this script + # normal cleanup deferred to later + [ $? = 0 ] && exit; cd ${WORKSPACE} sudo kpartx -dv out/${VENDOR}-${OS_FLAVOUR}-*.sd.img || true sudo git clean -fdxq diff --git a/lt-qcom-debian-images-arm64/installer-dragonboard-410c.sh b/lt-qcom-debian-images-arm64/installer-dragonboard-410c.sh index f2bdae6a47..a791ff8c05 100644 --- a/lt-qcom-debian-images-arm64/installer-dragonboard-410c.sh +++ b/lt-qcom-debian-images-arm64/installer-dragonboard-410c.sh @@ -6,6 +6,9 @@ trap cleanup_exit INT TERM EXIT cleanup_exit() { + # cleanup here, only in case of error in this script + # normal cleanup deferred to later + [ $? = 0 ] && exit; cd ${WORKSPACE} sudo git clean -fdxq } |