display runtime of script
This commit is contained in:
@@ -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)"
|
||||||
|
|||||||
Reference in New Issue
Block a user