From 263aca01e7bff430b1e3450aad021d22533eba52 Mon Sep 17 00:00:00 2001 From: Kroese Date: Wed, 3 May 2023 20:26:29 +0200 Subject: [PATCH] Better error handling --- run/run.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/run/run.sh b/run/run.sh index c669d99..325bd3b 100755 --- a/run/run.sh +++ b/run/run.sh @@ -15,8 +15,7 @@ echo "Starting QEMU for Docker v${VERSION}..." STORAGE="/storage" KERNEL=$(uname -r | cut -b 1) -trap 'echo >&2 "Error - exited with status $? at line $LINENO:"; - pr -tn $0 | tail -n+$((LINENO - 3)) | head -n7 >&2' ERR +trap 'echo >&2 "Error status $? for: ${BASH_COMMAND} (line $LINENO/$BASH_LINENO)"' ERR [ ! -d "$STORAGE" ] && echo "Storage folder (${STORAGE}) not found!" && exit 69 [ ! -f "/run/run.sh" ] && echo "Script must run inside Docker container!" && exit 60