mirror of
https://git.bolliret.ch/pcs/pcs-website
synced 2026-01-18 13:21:37 +01:00
17 lines
No EOL
1.2 KiB
Bash
17 lines
No EOL
1.2 KiB
Bash
#!/bin/bash
|
|
|
|
export PYTHONPYCACHEPREFIX=/tmp
|
|
|
|
sh -c ". /opt/venv/bin/activate && exec python /opt/lektor/scripts/calendar-fetcher.py ${CALENDAR_URL} > /opt/lektor/project/content/termine/contents.lr"
|
|
# TODO As the file reads from the same file as it's output is afterwards piped into this leads to synchronization/buffering issues, we therefore write to a temporaray file and move it to the right place in a subsequent step
|
|
tempfile=$(mktemp)
|
|
sh -c ". /opt/venv/bin/activate && exec python /opt/lektor/scripts/calendar-fetcher-main.py ${CALENDAR_URL} > $tempfile"
|
|
mv $tempfile /opt/lektor/project/content/contents.lr
|
|
|
|
sh -c ". /opt/venv/bin/activate && exec python /opt/lektor/scripts/calendar-fetcher+fr.py ${CALENDAR_URL} > /opt/lektor/project/content/termine/contents+fr.lr"
|
|
# TODO As the file reads from the same file as it's output is afterwards piped into this leads to synchronization/buffering issues, we therefore write to a temporaray file and move it to the right place in a subsequent step
|
|
tempfile=$(mktemp)
|
|
sh -c ". /opt/venv/bin/activate && exec python /opt/lektor/scripts/calendar-fetcher-main+fr.py ${CALENDAR_URL} > $tempfile"
|
|
mv $tempfile /opt/lektor/project/content/contents+fr.lr
|
|
|
|
exec "$@" |