To use a dmg disk image you would use:
hdiutil mount thefile.dmg
You then have a /Volumes/The\ Application.
In that directory you would usually either have an Application.app or a Application.pkg directory.
- If it’s an .app file, just copy the files to your
/Applications/directory:
sudo cp /Volumes/The\ Application/Application.app /Applications/ - f it’s a .pkg file, run:
sudo installer -package Application.pkg -target /Volumes/Mac\ OS
That’s it !