Allow yesterday for gitlab issues. - annna - Annna the nice friendly bot.
HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
---
DIR commit 0f7d5a0584a21e3c78792385a6314096bb3b0674
DIR parent f47bf4c4b5f456c78d960bbd7295cc33ed22d432
HTML Author: Annna Robert-Houdin <annna@bitreich.org>
Date: Sat, 27 Jan 2024 14:31:13 +0100
Allow yesterday for gitlab issues.
Diffstat:
M gitlab-vuxml-cronjob | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
DIR diff --git a/gitlab-vuxml-cronjob b/gitlab-vuxml-cronjob
@@ -10,6 +10,7 @@ then
else
curdate="$(date +%Y-%m-%d)"
fi
+yesterday="$(date +%Y-%m-%d -d "${curdate} -1 day")"
vuxmluri="$(curl -Ls http://www.vuxml.org/freebsd/pkg-gitlab-ce.html \
| grep 'class="topic"' \
@@ -28,7 +29,7 @@ randinsult="$({
printf "Evil_Bob, who is still using gitlab? %%s\n"
} | shuf -n 1)"
-if [ "$curdate" = "$entrydate" ]
+if [ "$curdate" = "$entrydate" -o "${yesterday}" = "${entrydate}" ]
then
annna-say -s "$insultserver" -c "$insultchannel" \
"$(printf "${randinsult}" "${vuxmluri}")"