diff options
author | wanchao.xu <wanchao.xu@samsung.com> | 2024-10-14 13:24:09 +0800 |
---|---|---|
committer | wanchao.xu <wanchao.xu@samsung.com> | 2024-10-28 14:11:35 +0800 |
commit | 6143c358bc106335c8d6290982cee29e291afaf1 (patch) | |
tree | bf4f97a3d3f576de0d84ca657f0f0c3fe7573eee | |
parent | 5bf5cb06be105ffa643d3f0d23a4b8c1abea1e92 (diff) | |
download | build-devel-py2.tar.gz build-devel-py2.tar.bz2 build-devel-py2.zip |
Cleanup the build root as default action if build system is broken.devel-py2
Change-Id: I0e4ddf8dcfc31e62c880fc35a3333678f85f30bb
Signed-off-by: wanchao.xu <wanchao.xu@samsung.com>
-rwxr-xr-x | init_buildsystem | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/init_buildsystem b/init_buildsystem index 3e4a892..7c0171a 100755 --- a/init_buildsystem +++ b/init_buildsystem @@ -649,15 +649,20 @@ if test -e "$BUILD_IS_RUNNING" ; then echo "N - No, abort build (default on enter)" echo "c - Continue anyway with this build root" echo -n "[y/N/c] " - read ANSWER - case "$ANSWER" in - c|C) - rm -f $BUILD_IS_RUNNING "$BUILD_ROOT"/exit ;; - y|Y) - clean_build_root ;; - *) - cleanup_and_exit 1 ;; - esac + read -t 10 ANSWER + if test "$?" -ne 0 ; then + echo "cleanup the build root as default action" + clean_build_root + else + case "$ANSWER" in + c|C) + rm -f $BUILD_IS_RUNNING "$BUILD_ROOT"/exit ;; + y|Y) + clean_build_root ;; + *) + cleanup_and_exit 1 ;; + esac + fi fi # check for surprises |