Created
March 2, 2015 14:47
-
-
Save arubdesu/daa8af2e78cd2601792f to your computer and use it in GitHub Desktop.
Setting dock without MCX/profiles once per login via outset
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # dockutil configuration via outset's login-once option | |
| # originally tested on 10.10.3, March, 2015 | |
| set -x | |
| sleep 4 | |
| declare -xr dockutil=/usr/local/sbin/dockutil | |
| declare -xa ADDS=('Firefox.app' 'Google Chrome.app' 'Microsoft Outlook.app' \ | |
| 'Microsoft Office 2011/Microsoft Word.app' \ | |
| 'Microsoft Office 2011/Microsoft Excel.app' \ | |
| 'Microsoft Office 2011/Microsoft PowerPoint.app') | |
| IFS=$'\n' # yes, I should be doing better quoting around vars, it's bash, waddaya want | |
| for app in ${ADDS[@]}; do | |
| if [[ -d /Applications/"$app" ]]; then | |
| $dockutil --add /Applications/"$app" --no-restart | |
| fi | |
| done | |
| sleep 2 | |
| $dockutil --remove Mail # should generate a restart, gotta love cfprefsd w/ the dock esp. | |
| exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment