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