I have written a shell script that creates an encrypted sparsebundle disk image. I want to add a pubkey to the sparsebundle, but the option -pubkey (which is documented by Apple) is getting rejected when I add it to the shell script, or even when I just run a single line command in bash.
Am I missing something about this option? I read the documentation, but I still can't get it to work.
Currently the "create" line of the shell script looks like this (the script works fine as is, but when I add -pubkey it gives me a "usage" return):
echo $password | hdiutil create -size $space -encryption -type SPARSEBUNDLE -fs HFS+J $name