aboutsummaryrefslogtreecommitdiff
path: root/sh/profile.d
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-23 23:42:30 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-23 23:42:30 +1200
commit04ea9cd52c332c3071886413a897122e2cea37c5 (patch)
tree277931d361c602768be19469ebbbb5cef2341215 /sh/profile.d
parentAbbreviation in fortune.sh (diff)
downloaddotfiles-04ea9cd52c332c3071886413a897122e2cea37c5.tar.gz
dotfiles-04ea9cd52c332c3071886413a897122e2cea37c5.zip
Initialise last var
Diffstat (limited to 'sh/profile.d')
-rw-r--r--sh/profile.d/verse.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/sh/profile.d/verse.sh b/sh/profile.d/verse.sh
index 353c882a..303a1b05 100644
--- a/sh/profile.d/verse.sh
+++ b/sh/profile.d/verse.sh
@@ -18,6 +18,7 @@ command -v verse >/dev/null 2>&1 || return
# date); run in a subshell to keep vars out of global namespace
(
now=$(date +%Y%m%d)
+ last=0
[ -f "$HOME"/.verse ] && last=$(cat -- "$HOME"/.verse)
[ "$now" -gt "$last" ] || exit
verse