]> git.plutz.net Git - confetti/blobdiff - cards/list.sh
omit listing of empty courses and vcards
[confetti] / cards / list.sh
index a7b8c13671dadc3d823d87368619a5ae9e08ec21..6e78def7ae2856ee915bcdbcdb67d02cb3b7ee1b 100755 (executable)
@@ -113,11 +113,9 @@ print_cards(){
 
   while read cardfile; do
     cachefile="${_DATA}/cache/${cardfile##*/}.cache"
-    # if [ -s "$cachefile" -a "$cachefile" -nt "$cardfile" \
-    #                      -a "$cachefile" -nt "${_EXEC}/cards" ]; then
     if [ -s "$cachefile" -a "$cachefile" -nt "$cardfile" ]; then
       cat "$cachefile"
-    else
+    elif [ -s "$cardfile" ]; then
       print_card "$cardfile" |tee "$cachefile"
     fi
   done