You can mount a disk image using
hdiutil attach -mountpoint <path-to-desired-mountpoint> <filename.dmg>
The disk image will be mounted on the selected path (the argument following -mountpoint ). Then find the .app file and copy the file to /Applications .
Once you are done installing, unmount the disk image:
hdiutil detach <path-to-mountpoint>
nimrodm
source share