AFP548

Creating an encrypted disk image in a shell script

After jumping through quite a few hoops and filling a sparseimage, the backup script I'm creating needs to convert said sparseimage to a read only disk image, which is encrypted. Currently, I have this: [code]hdiutil convert -quiet $bkpath/$tempname -format UDRO -o $bkpath/$endname -encryption -passphrase $password[/code] Obviously this isn't ideal as -passphrase has been deprecated in favour of -stdinpass. Thing is, my brain isn't working well enough to actually make -sdinpass work. How would I go about passing the variable $password off as input to this line?
Exit mobile version