Skip to content

Instantly share code, notes, and snippets.

@jmcerrejon
Created November 8, 2024 07:53
Show Gist options
  • Save jmcerrejon/400048352683a8c391b3acc023eff59b to your computer and use it in GitHub Desktop.
Save jmcerrejon/400048352683a8c391b3acc023eff59b to your computer and use it in GitHub Desktop.
This script automates the download/update and installation of Grammarly on macOS using curl
#!/bin/bash
#
# This script automates the download/update and installation of Grammarly on macOS using curl
# Author: Jose Cerrejon
# Email: ulysess_.at_gmail.com
# Version: 1.0.0
#
URL="https://download-mac.grammarly.com/Grammarly.dmg"
DMG_PATH="/tmp/Grammarly.dmg"
MOUNT_POINT="/Volumes/Grammarly"
INSTALLER_APP="Grammarly Installer.app"
curl -L -o "$DMG_PATH" "$URL"
hdiutil attach "$DMG_PATH" -mountpoint "$MOUNT_POINT" -nobrowse -quiet
open -a "$MOUNT_POINT/$INSTALLER_APP"
read -p "Press [Enter] key after you have installed Grammarly..."
hdiutil detach "$MOUNT_POINT" -quiet
[ -f "$DMG_PATH" ] && rm -f "$DMG_PATH"
echo "Grammarly has been installed/updated successfully."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment