Change-Id: I0e4ddf8dcfc31e62c880fc35a3333678f85f30bb
Signed-off-by: wanchao.xu <wanchao.xu@samsung.com>
echo "N - No, abort build (default on enter)"
echo "c - Continue anyway with this build root"
echo -n "[y/N/c] "
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