diff options
author | 2022-09-03 02:23:04 +0100 | |
---|---|---|
committer | 2022-09-03 02:23:04 +0100 | |
commit | 0d01497249a825e1d39862fd9d9ed6edde9a92bf (patch) | |
tree | 28ed2743c5e2ebafdb60ee094258588ed0596563 /keyrings-export.bash | |
parent | pkgcheck2html: update (diff) | |
download | qa-scripts-0d01497249a825e1d39862fd9d9ed6edde9a92bf.tar.gz qa-scripts-0d01497249a825e1d39862fd9d9ed6edde9a92bf.tar.bz2 qa-scripts-0d01497249a825e1d39862fd9d9ed6edde9a92bf.zip |
keyrings-export.bash: only run weekly for timestamped files
Otherwise we'd end up having files like service-keys-20220905.gpg
created on 20220830.
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'keyrings-export.bash')
-rwxr-xr-x | keyrings-export.bash | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/keyrings-export.bash b/keyrings-export.bash index 815c50b..39091f4 100755 --- a/keyrings-export.bash +++ b/keyrings-export.bash @@ -51,7 +51,13 @@ for key in service-keys committing-devs active-devs infra-devs retired-devs all- ln -s "${OUTPUT_DIR}"/keys/${key}.gpg "${OUTPUT_DIR}"/${key}.gpg fi - timestamp=$(date -u +%Y%m%d -d "monday") + timestamp=$(date -u +%Y%m%d-%A -d "monday") + + if [[ ${timestamp} != *-Monday ]] ; + break + fi + + timestamp=${timestamp/-Monday/} # Don't clobber existing timestamped keys for this period (weekly) # if we're running several times a day. |