display runtime of script

This commit is contained in:
2018-07-05 17:55:29 +02:00
parent 47e801e1f8
commit 39a03fce20

View File

@@ -1,5 +1,7 @@
#!/bin/bash
start=`date +%s`
CURDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
TMP=/tmp/status
source "$TMP"
@@ -13,6 +15,8 @@ else
offlineimap
fi
sync=`date +%s`
# Index new mails which will be tagged with notmuch's new.tags
echo "[DEBUG] Sync notmuch database with new mails"
notmuch new
@@ -49,4 +53,5 @@ notmuch tag -unread -- path:Trash.ignore-mod/**
echo "[DEBUG] Remove the 'new' tag"
notmuch tag -new -- tag:new
echo "[DEBUG] poll.sh exited successfully"
end=`date +%s`
echo "[DEBUG] poll.sh exited after $((end-start))s ($((sync-start))s download)"