Skip to content

Instantly share code, notes, and snippets.

@mattborn
Created February 25, 2014 22:30
Show Gist options
  • Save mattborn/9219314 to your computer and use it in GitHub Desktop.
Save mattborn/9219314 to your computer and use it in GitHub Desktop.
Automating closing apps when done working
#!/bin/bash
apps=( Calendar Evernote Google\ Chrome Hall Messages SourceTree Spotify Sublime\ Text\ 2 Tunnelblick )
for app in "${apps[@]}"
do
echo Closing "$app".
osascript -e "tell application \"$app\" to quit"
done
echo Halting Vagrant.
cd ~/Code/vagrant-instance; vagrant halt
echo Detaching Encrypted Volume.
hdiutil detach /Volumes/Volume
echo Complete.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment