Mount .sparseimage from .bash_profile I need to mount a .sparseimage from .bash_profile but I don't get how to do it. I tried:

alias of22='hdiutil attach "Documents/OF.sparseimage" -mountpoint "$HOME/OpenFOAM" &gt; /dev/null ; . $HOME/OpenFOAM/OpenFOAM-2.2.0/etc/bashrc'


but this gives me:

hdiutil: attach failed - no mountable filesystem


if I double-click on it or I put it in Startup Items it works (but i need also to source the bashrc after the mount)

What's the problem?
The open(1) command can do it:

/usr/bin/open /full/path/to/OF.sparseimage