diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-23 20:36:03 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-23 20:38:17 +1200 |
commit | 8c2588dffd8404867fed65832a1f35cf804350b3 (patch) | |
tree | 3ba2c17d29583e5c05c134423c2b1b2cc358413a /sh/profile.d | |
parent | Expand and whitelist BASH_VERSINFO check in han(1) (diff) | |
download | dotfiles-8c2588dffd8404867fed65832a1f35cf804350b3.tar.gz dotfiles-8c2588dffd8404867fed65832a1f35cf804350b3.zip |
Change verse login check to use numeric test
shellcheck warned me that \> isn't POSIX
Diffstat (limited to 'sh/profile.d')
-rw-r--r-- | sh/profile.d/verse.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sh/profile.d/verse.sh b/sh/profile.d/verse.sh index ef68bb93..353c882a 100644 --- a/sh/profile.d/verse.sh +++ b/sh/profile.d/verse.sh @@ -17,9 +17,9 @@ command -v verse >/dev/null 2>&1 || return # Run verse(1) if we haven't seen it already today (the verses are selected by # date); run in a subshell to keep vars out of global namespace ( - now=$(date +%Y-%m-%d) + now=$(date +%Y%m%d) [ -f "$HOME"/.verse ] && last=$(cat -- "$HOME"/.verse) - [ "$now" \> "$last" ] || exit + [ "$now" -gt "$last" ] || exit verse printf '\n' printf '%s\n' "$now" > "$HOME"/.verse |