Allow yesterday for gitlab issues. - annna - Annna the nice friendly bot. | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 0f7d5a0584a21e3c78792385a6314096bb3b0674 | |
parent f47bf4c4b5f456c78d960bbd7295cc33ed22d432 | |
Author: Annna Robert-Houdin <[email protected]> | |
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(-) | |
--- | |
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}")" |