Outputting script execution time

This commit is contained in:
Jeroen De Meerleer 2018-11-30 16:26:58 +01:00
parent 24b3371b5a
commit 13a420a5b1

View File

@ -1,5 +1,6 @@
#!/bin/bash #!/bin/bash
begin=$(date +"%s")
# saner programming env: these switches turn some bugs into errors # saner programming env: these switches turn some bugs into errors
set -o errexit -o pipefail -o noclobber -o nounset set -o errexit -o pipefail -o noclobber -o nounset
source="-" source="-"
@ -204,3 +205,7 @@ fi
ConvertFiles ConvertFiles
CopyFiles CopyFiles
CleanUp CleanUp
termin=$(date +"%s")
difftimelps=$(($termin-$begin))
VerboseOutput 1 "$(($difftimelps / 60)) minutes and $(($difftimelps % 60)) seconds elapsed for Script Execution."