From eb89e0a51ae1ccbbfbe043e955dcc74d05617574 Mon Sep 17 00:00:00 2001 From: Jybz Date: Sat, 15 Aug 2020 23:06:26 +0200 Subject: add timestamp --- create_arm_image.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'create_arm_image.sh') diff --git a/create_arm_image.sh b/create_arm_image.sh index 4ba02c7..0e037f8 100755 --- a/create_arm_image.sh +++ b/create_arm_image.sh @@ -20,24 +20,29 @@ #Change the local to the most global export LC_ALL=C +function timestamp() { + date "+[%H:%M:%S]" +} + + function WaitToContinue() { read -p "Break... Press [ENTER] to continue." GARBAGE } function title() { - echo -e "\e[1;32m${1}\e[0m" + echo -e "\e[1;32m$(timestamp) ${1}\e[0m" } function info() { - echo -e "\e[36m${1}\e[0m" + echo -e "\e[36m$(timestamp) ${1}\e[0m" } function warning() { - echo -e "\e[1;35m${1}\e[0m" + echo -e "\e[1;35m$(timestamp) ${1}\e[0m" } function error() { - echo -e "\e[1;31m${1}\e[0m" + echo -e "\e[1;31m$(timestamp) ${1}\e[0m" } function help() { -- cgit v1.2.1