chiark / gitweb /
cryptop.public: New operation to export a key with its properties.
[distorted-keys] / keyfunc.sh.in
index a618e666a1ddd4dbd49ce343827bfb3c4e95e946..89decccd77af900104ddacea1f1ce96c7c0f12bf 100644 (file)
@@ -240,6 +240,16 @@ EOF
   done
 }
 
+dumpprops () {
+  prefix=$1
+  ## Write the properties stored in the variables beginning with PREFIX.
+
+  set | sed -n "/^$prefix/{s/=.*\$//;p}" | sort | while read name; do
+    eval value=\$$name
+    echo "${name#$prefix}=$value"
+  done
+}
+
 defprops () {
   name=$1
   ## Define a properties table NAME.