aboutsummaryrefslogtreecommitdiff
path: root/sh/profile.d/verse.sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2015-06-10 10:44:18 +1200
committerTom Ryder <tom@sanctum.geek.nz>2015-06-10 10:44:18 +1200
commit69dabe5a87f556505b6dd05ea2250df293b4889b (patch)
treeffefcd8b0d4ac4d6d61beea8dd4ac67031f79b99 /sh/profile.d/verse.sh
parentPrint verse(1) output on login but only once a day (diff)
downloaddotfiles-69dabe5a87f556505b6dd05ea2250df293b4889b.tar.gz
dotfiles-69dabe5a87f556505b6dd05ea2250df293b4889b.zip
Instate .bash_profile.d
Stuff that prints messages really only needs to be done for my primary login shell
Diffstat (limited to 'sh/profile.d/verse.sh')
-rw-r--r--sh/profile.d/verse.sh15
1 files changed, 0 insertions, 15 deletions
diff --git a/sh/profile.d/verse.sh b/sh/profile.d/verse.sh
deleted file mode 100644
index c4fec152..00000000
--- a/sh/profile.d/verse.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-# Run verse(1) if it's installed and we haven't seen it already today (the
-# verses are selected by date); run in a subshell to keep vars out of global
-# namespace
-if command -v verse >/dev/null 2>&1 ; then (
- date=$(date +%Y-%m-%d)
- versefile=${VERSEFILE:-$HOME/.verse}
- if [ -e "$HOME"/.verse ] ; then
- read -r lastversedate < "$versefile"
- fi
- if [ "$date" \> "$lastversedate" ] ; then
- printf '\n%s\n\n' "$(verse)"
- printf '%s\n' "$date" > "$versefile"
- fi
-) ; fi
-