From 8fbd2a9f420b71a668030caeeba7b3418fa1e4d0 Mon Sep 17 00:00:00 2001 From: Pawel Langowski Date: Tue, 19 Nov 2024 12:23:54 +0100 Subject: [PATCH] scripts/dts: Wait for user input on exit codes other than 0 Signed-off-by: Pawel Langowski --- scripts/dts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/dts b/scripts/dts index 79264735..0cf608ac 100644 --- a/scripts/dts +++ b/scripts/dts @@ -10,6 +10,15 @@ source $DTS_SUBS trap : 2 trap : 3 +trap wait_for_input EXIT + +wait_for_input() { + code=$? + if [[ $code -ne 0 ]]; then + read -p "Press Enter to continue." + fi + exit $code +} while : ; do clear