From 5f71b58975032a20bc413962e039a84c295d7f67 Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Tue, 15 Sep 2026 19:16:23 +0200 Subject: [PATCH] bugfix --- .../templates/cache_realraum_imported_calendar.sh.j2 | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/ansible/roles/web/r3status/templates/cache_realraum_imported_calendar.sh.j2 b/ansible/roles/web/r3status/templates/cache_realraum_imported_calendar.sh.j2 index 5255559..a8fea15 100755 --- a/ansible/roles/web/r3status/templates/cache_realraum_imported_calendar.sh.j2 +++ b/ansible/roles/web/r3status/templates/cache_realraum_imported_calendar.sh.j2 @@ -23,7 +23,6 @@ function get_merge_ics shift local sources=("$@") { - # Emit a VCALENDAR header echo "BEGIN:VCALENDAR" echo "VERSION:2.0" echo "PRODID:-//merge-ics//zsh//lauti.org//EN" @@ -32,17 +31,14 @@ function get_merge_ics # For each .ics file, strip the outer VCALENDAR block but keep events for s in "$sources[@]"; do [[ -n $s ]] || continue - # Remove BEGIN:VCALENDAR / END:VCALENDAR lines (and their associated - # header properties like VERSION, PRODID, CALSCALE, X-WR-CALNAME) - # by extracting only the VEVENT (and VTODO/VALARM) blocks. - awk ' - /^BEGIN:V(EVENT|TODO|TIMEZONE)/ { print; inblock=1; depth=0 } + awk ' + /^BEGIN:V(EVENT|TODO|TIMEZONE)/ { inblock=1; depth=1; print; next } inblock { if (/^BEGIN:/) depth++ else if (/^END:/) { depth--; if (depth==0) inblock=0 } print } - ' =( wget --no-check-certificate -o /dev/null --tries=1 "$s" --quiet -o /dev/null -O - 2>/dev/null) + ' =( wget --no-check-certificate --tries=1 "$s" --quiet -o /dev/null -O - 2>/dev/null ) echo done @@ -50,8 +46,6 @@ function get_merge_ics } >! "$out" } - - mkdir $APACHE_PATH 2>/dev/null mkdir $DL_PATH 2>/dev/null ### sed makes ical validate according to http://severinghaus.org/projects/icv/?url=https%3A%2F%2Fr3.at%2Fevents.ical -- 1.7.10.4