From 4e20b525c0648da435db9e5e4fd91577330c7b6e Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Sat, 20 Aug 2011 00:36:56 +0000 Subject: [PATCH] deployment.sh: to inform user about time it took to execute deployment script From: Michael Prokop --- deployment.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/deployment.sh b/deployment.sh index 0b4ce75..a820de6 100755 --- a/deployment.sh +++ b/deployment.sh @@ -21,6 +21,8 @@ set -e export LC_ALL=C export LANG=C +start_seconds=$(cut -d . -f 1 /proc/uptime) + # defaults TARGET=/mnt PRO_EDITION=false @@ -923,6 +925,9 @@ to boot from hard disk by default or to boot from USB storage by default." fi +[ -n "$start_seconds" ] && SECONDS="$[$(cut -d . -f 1 /proc/uptime)-$start_seconds]" || SECONDS="unknown" +echo "Successfully finished deployment process [$(date) - running ${SECONDS} seconds]" + echo "Do you want to [r]eboot or [h]alt the system now? (Press any other key to cancel.)" unset a read a