From e76b410b860cefe5f0a3f6c744f317899186e96b Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Tue, 21 Jun 2022 09:07:11 +0200 Subject: Changed folder for scripts (see README.md diff) --- scripts/sdep-list | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'scripts/sdep-list') diff --git a/scripts/sdep-list b/scripts/sdep-list index 50d3fe7..1a9a1bf 100755 --- a/scripts/sdep-list +++ b/scripts/sdep-list @@ -4,7 +4,7 @@ # Recurring events are listed at most once, and only if their first occurrence # is in the range. # -# The events are read from the following files in the $sdepdata folder: +# The events are read from the following files in the SDEPDATA folder: # once: events that only happen once; full date needs to be specified # daily: events that happen every day; only specify the time in HH:MM format # weekly: only specify Weekday + time @@ -15,8 +15,6 @@ # Usage: sdep-list [today|tomorrow|week|nextweek|past|future] # No options = all -sdepdata="${XDG_DATA_HOME:-$HOME/.local/share}/sdep" - from="" to="" w="%d %b %H:%M" @@ -54,13 +52,13 @@ esac tempfile=$(mktemp) -cat "$sdepdata/once" > "$tempfile" -sed "s/^/$(date +%Y-%m-%d) /" <"$sdepdata/daily" >> "$tempfile" +cat "SDEPDATA/once" > "$tempfile" +sed "s/^/$(date +%Y-%m-%d) /" <"SDEPDATA/daily" >> "$tempfile" while read line; do weekday=$(echo "$line" | sed "s/ .*$//") echo "$line" | sed "s/^[ ]*[^ ]* /$(date -d $weekday +%Y-%m-%d) /" -done <"$sdepdata/weekly" >> "$tempfile" -sed "s/^[ ]*/$(date +%Y-%m-)/" <"$sdepdata/daily" >> "$tempfile" +done <"SDEPDATA/weekly" >> "$tempfile" +sed "s/^[ ]*/$(date +%Y-%m-)/" <"SDEPDATA/daily" >> "$tempfile" sdep -w "$w" -f "$from" -t "$to" <"$tempfile" -- cgit v1.3