I'm trying to create an automated way to download multiple applications and install them, and I seem to be having trouble at the first hurdle. I am able to download and install .pkg files with no issue, but when it comes to .dmg files I'm getting an 'Image not recognized' error. Here is the lines of commands I'm having issue with:
curl --user-agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.2 Safari/605.1.15" -L -k https://m.vona.ge/getMAC > /tmp/vonage.dmg
hdiutil attach -mountpoint /Volumes/vonage /tmp/vonage.dmg
cp -R /Volumes/vonage/Vonage\ Business.app /Applications/
The DMG files download and open with no issue when downloaded in Safari, but using curl in Terminal gives me the same problem every time. Here is my error:
hdiutil: attach failed - image not recognized
Any help would be greatly appreciated!