Skip to content

Instantly share code, notes, and snippets.

@oxguy3
Created August 22, 2016 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oxguy3/ac48f7fc7f083525e9d655a86db16048 to your computer and use it in GitHub Desktop.
Save oxguy3/ac48f7fc7f083525e9d655a86db16048 to your computer and use it in GitHub Desktop.
old bash script from high school -- I used this to quickly disable natural scrolling and download Chrome every time I used school computers
#!/bin/bash
cd ~/Desktop
echo ""
echo "LAUNCHING MOUSE PREFERENCES..."
osascript -e 'tell application "System Preferences"
activate
set the current pane to pane id "com.apple.preference.mouse"
end tell'
echo ""
echo "DOWNLOADING CHROME.DMG..."
curl https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg -o chrome.dmg
echo ""
echo "MOUNTING CHROME.DMG..."
hdiutil attach -nobrowse chrome.dmg
echo ""
echo "COPYING CHROME TO DESKTOP..."
rsync -av "/Volumes/Google Chrome/Google Chrome.app" ~/Desktop
echo ""
echo "UNMOUNTING CHROME.DMG..."
hdiutil detach "/Volumes/Google Chrome"
echo ""
echo "DELETING CHROME.DMG..."
rm chrome.dmg
echo ""
echo "LAUNCHING CHROME..."
open -a Google\ Chrome.app --args --no-default-browser-check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment