Move the functionality into the library. Also, stop mangling
underscores in a broken way -- in fact, don't do it at all, so the
output is acceptable to `readprops'.
mktmp
prepare "$key" info
-set | sed -n '/^kprop_/{s///;y/_/-/;p}'
+dumpprops kprop_
k_info $kdir
###----- That's all, folks --------------------------------------------------
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.