FTBFS reminder: Deal with week numbers 01 to 09 correctly

Apparently, date +%W gives week number with leading zero and there is no alternative.

Shell math's % cannot deal with that, so we sed the zero out.

Signed-off-by: Miro Hrončok <miro@hroncok.cz>

Consider my patch Public Domain or CC0.
This commit is contained in:
Miro Hrončok 2020-03-08 11:25:34 +01:00 committed by Pierre-Yves Chibon
parent 75881318a7
commit bd59cac72d

View file

@ -1,7 +1,7 @@
#!/bin/bash
# A weekly cron job which actually does the items needed.
# Only run every third week, see https://pagure.io/releng/issue/8915
test $(($(date +%W) % 3)) -eq 0 || exit 0
test $(($(date +%W | sed s.^0..) % 3)) -eq 0 || exit 0
TMPDIR=`mktemp -d /tmp/ftbfs_reminder.XXXXXX`
GITREPO=https://pagure.io/releng.git
SCRIPT=ftbfs_weekly_reminder.py