From 0f8284afce7a1a91a60a71855c5439a2786e7388 Mon Sep 17 00:00:00 2001 From: lemoer Date: Sun, 29 Dec 2024 03:14:51 +0100 Subject: [PATCH] Automatically get weeknumber in putzen.sh --- putzen.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/putzen.sh b/putzen.sh index d165ec1..59ea62a 100644 --- a/putzen.sh +++ b/putzen.sh @@ -1,11 +1,9 @@ #!/bin/sh -if [ -z "$1" ]; then - echo "Usage: $0 [1-4]" - exit 1 -fi +# Week number since 1970 modulo 4 +week=$(expr $(date +%s) / 604800 % 4) -case $1 in +case $week in 1) /usr/bin/docker exec lab-signal-bot-lab-bot-1 \ python create_task.py "LeineLab putzen" 2 "in 7 days" \