]> git.plutz.net Git - lobster/blobdiff - therapies/index.cgi
make loading prescrition file optional
[lobster] / therapies / index.cgi
index 6284c0033f504e53422e5c09cedade5fb4598811..515f2b0265308042562f291f0a93a61ad7af6d2f 100755 (executable)
@@ -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" "$@"; }