From: Paul Hänsch Date: Wed, 5 Aug 2020 14:17:31 +0000 (+0200) Subject: make loading prescrition file optional X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=aaf902bbb025442df82f705d495fa79bc4975254;p=lobster make loading prescrition file optional --- diff --git a/therapies/index.cgi b/therapies/index.cgi index 6284c00..515f2b0 100755 --- a/therapies/index.cgi +++ b/therapies/index.cgi @@ -58,7 +58,7 @@ mpxfile="${_DATA}/prescriptions/${id}.mpx" tpyfile="${_DATA}/therapies/${id}.tpy" vcf="$(pdi_load "$vcffile")" -mpx="$(sed '1s;^;\n;; s/:/;:/' "$mpxfile")" +mpx="$([ -f "$mpxfile" ] && sed '1s;^;\n;; s/:/;:/' "$mpxfile")" tpy="$(sed '1s;^;\n;; s/:/;:/' "$tpyfile")" VCF(){ pdi_value "$vcf" "$@"; }