]> git.plutz.net Git - lobster/commitdiff
syntax cleanup
authorpaul <paul@plutz.net>
Fri, 4 Nov 2016 13:22:35 +0000 (13:22 +0000)
committerpaul <paul@plutz.net>
Fri, 4 Nov 2016 13:22:35 +0000 (13:22 +0000)
svn path=/trunk/; revision=134

actions/generate_courselist.sh

index 97589ee6f7b96ccd6761799e33ea671ab95b326d..71eb80abcf162cc213bf19bc1cdcfb3705abc1c5 100755 (executable)
@@ -19,8 +19,8 @@
 
 pdflatex="$(where pdflatex |head -n1 || echo false)"
 course="${_GET[course]}"
-fromdate=$_GET[fromdate]
-fromdate=$(date -d "$fromdate" +%s)
+fromdate="${_GET[fromdate]}"
+fromdate="$(date -d "$fromdate" +%s)" 2>/dev/null
 [ -z "$fromdate" ] && fromdate=$(date +%s)
 
 . ${_EXEC}/pages/courses.sh
@@ -124,7 +124,7 @@ get_dates() {  #Parameter: Calendarfile
   rrule="$values[RRULE]"
   rr_int="$(echo $rrule |sed -rn 's:^.*INTERVAL=([0-9]+)(;.*)?$:\1:p')"
   rr_freq="$(echo $rrule |sed -rn 's:^.*FREQ=(YEARLY|MONTHLY|WEEKLY|DAILY)(;.*)?$:\1:p')"
-  case "$rr_freq" in;
+  case "$rr_freq" in
     YEARLY) rec="$rr_int year";;
     MONTHLY) rec="$rr_int month";;
     DAILY) rec="$rr_int day";;