Multiple key types, key profiles, and user key storage.
[distorted-keys] / keys.keeper-cards
similarity index 97%
rename from keeper-cards
rename to keys.keeper-cards
index 359c5a2..73f2411 100755 (executable)
@@ -40,10 +40,9 @@ index.  If no INDICES are given then all secret keys are written.
 The public keys are found in $KEYS/keeper/KEEPER/I.pub;
 private keys are read from KEEPER/I in the current directory.
 HELP
-dohelp
 
 ## Parse the command line.
-case $# in 0) echo >&2 "$usage"; exit 1 ;; esac
+case $# in 0) usage_err ;; esac
 keeper=$1; shift
 checkword "keeper set label" "$keeper"
 read n hunoz <$KEYS/keeper/$keeper/meta
@@ -65,21 +64,21 @@ for range in "$@"; do
       ;;
   esac
   case "$low" in ?*) ;; *) low=0 ;; esac
-  case "$high" in ?*) ;; *) high=$((n - 1)) ;; esac
+  case "$high" in ?*) ;; *) high=$(( $n - 1 )) ;; esac
   if [ 0 -gt $low -o $low -gt $high -o $high -ge $n ]; then
     echo >&2 "$quis: invalid index range \`$range'"
     exit 1
   fi
-  i=$((low + 0))
+  i=$(( $low + 0 ))
   while [ $i -le $high ]; do
     case $want in *:"$i":*) ;; *) want=$want$i: ;; esac
-    i=$((i + 1))
+    i=$(( $i + 1 ))
   done
 done
 
 ## Start working on the output file.  This will contain deep secrets, so
 ## don't leave stuff easily readable.
-tmp=$(mktmp); cleanup rmtmp
+mktmp
 umask 077
 exec 3>$tmp/$keeper.tex
 cat >&3 <<'EOF'
@@ -247,7 +246,7 @@ while [ $i -lt $n ]; do
 \card{$i}{$secret}
 EOF
   esac
-  i=$((i + 1))
+  i=$(( $i + 1 ))
 done
 
 ## Wrap up and build the document.