Outputting script execution time

This commit is contained in:
Jeroen De Meerleer 2018-11-30 16:26:58 +01:00
parent 24b3371b5a
commit 13a420a5b1
1 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,6 @@
#!/bin/bash
begin=$(date +"%s")
# saner programming env: these switches turn some bugs into errors
set -o errexit -o pipefail -o noclobber -o nounset
source="-"
@ -203,4 +204,8 @@ if [[ ! -f /tmp/music-sync-filelist ]]; then
fi
ConvertFiles
CopyFiles
CleanUp
CleanUp
termin=$(date +"%s")
difftimelps=$(($termin-$begin))
VerboseOutput 1 "$(($difftimelps / 60)) minutes and $(($difftimelps % 60)) seconds elapsed for Script Execution."