]> git.plutz.net Git - confetti/blobdiff - cards/list.sh
use $upcase constant only in its function
[confetti] / cards / list.sh
index a7b8c13671dadc3d823d87368619a5ae9e08ec21..519005c08f780bc5e09dc64717fa72bd46425482 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
@@ -150,6 +148,7 @@ filter_attendance(){
 
 filter_cards(){
   local filter f fex='x;p;'
+  local upcase=' y;abcdefghijklmnopqrstuvwxyzäöüé;ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜÉ;; '
 
   filter="$(printf %s "${filter}" \
             | sed -E 's;[]\/\(\)\\\$\?\.\+\*\;\[\{\}];\\&;g;