agenda: Exit if any of the .org files do not exist

This commit is contained in:
elenapan 2024-12-18 10:24:29 +02:00
parent 4e73935c18
commit e720d3ec01

View file

@ -2,6 +2,13 @@
org_files=("$HOME/notes/todo.org" "$HOME/notes/birthdays.org" "$HOME/notes/finance.org" "$HOME/notes/health.org" "$HOME/notes/home.org")
for file in "${org_files[@]}"; do
if [ ! -f "$file" ]; then
echo File "$file" does not exist
exit 1
fi
done
update() {
~/.config/eww/scripts/agenda.py "${org_files[@]}"
~/.config/eww/scripts/cal.py
@ -19,5 +26,6 @@ done)&
while true; do
inotifywait -qq -e modify "${org_files[@]}"
echo update
update;
done