Cleanup the build root as default action if build system is broken. 87/319587/1 accepted/tools_devbase_tools_legacy devel-py2 accepted/tools/devbase/tools/legacy/20250527.042449
authorwanchao.xu <wanchao.xu@samsung.com>
Mon, 14 Oct 2024 05:24:09 +0000 (13:24 +0800)
committerwanchao.xu <wanchao.xu@samsung.com>
Mon, 28 Oct 2024 06:11:35 +0000 (14:11 +0800)
Change-Id: I0e4ddf8dcfc31e62c880fc35a3333678f85f30bb
Signed-off-by: wanchao.xu <wanchao.xu@samsung.com>
init_buildsystem

index 3e4a892341042f8005e758c2666c76806053252e..7c0171aeb93948d69da68168a6f487a02f5b11cf 100755 (executable)
@@ -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