X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=courses%2Fexport_pdf.sh;h=92e10c5f900626b0805da4224f3b5599bcbec039;hp=62bb69e50f6c00e3c36bcdacc2c84f9f86a0e5ed;hb=HEAD;hpb=76c1e7bff1a8604ef2ef7da5d274d0db0e639139 diff --git a/courses/export_pdf.sh b/courses/export_pdf.sh index 62bb69e..92e10c5 100755 --- a/courses/export_pdf.sh +++ b/courses/export_pdf.sh @@ -7,11 +7,11 @@ coursefile="${_DATA}/ical/$(GET course)" if [ ! -r "$coursefile" ]; then SET_COOKIE 0 message="Cannot read course file" - REDIRECT /courses/ + REDIRECT "${_BASE}/courses/" return 0 elif ! mkdir -p "$_DATA/export"; then SET_COOKIE 0 message="Cannot create export directory" - REDIRECT /courses/ + REDIRECT "${_BASE}/courses/" return 0 fi @@ -123,10 +123,10 @@ style_td='style="border: 1pt solid; padding: 1mm 2mm; vertical-align: top;"' ]] EOF -export HOME="$_DATA" +export HOME="$_DATA/" export XDG_CONFIG_HOME="$_DATA/xdg_config" export XDG_CACHE_HOME="$_DATA/xdg_cache" export XDG_DATA_HOME="$_DATA/xdg_local" lowriter --convert-to pdf --outdir "$_DATA/export/" "$htmlfile" >/dev/null -REDIRECT "$(URL "/export/${pdffile##*/}")" +REDIRECT "$(URL "${_BASE}/export/${pdffile##*/}")"