Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
date="/bin/date"
dockutil="/usr/local/bin/dockutil"
sleep="/bin/sleep"
stat="/usr/bin/stat"
HOMECREATION=$(${stat} -f "%B" $HOME)
HOMEDATE=$(${date} -jf "%s" "${HOMECREATION}" +%Y%m%d)
TODAYDATE=$(${date} "+%Y%m%d")
if [ ${TODAYDATE} -gt ${HOMEDATE} ];
then
exit 0
else
${dockutil} --remove all --no-restart
${sleep} 2
${dockutil} --add "/Applications/Managed Software Center.app" --no-restart --position 1
${dockutil} --add "/Applications/Mail.app" --no-restart --position 2
${dockutil} --add "/Applications/Safari.app" --no-restart --position 3
${dockutil} --add "/Applications/Firefox.app" --no-restart --position 4
${dockutil} --add "/Applications/iTunes.app" --no-restart --position 5
${dockutil} --add "/Applications/System Preferences.app" --no-restart --position 6
${dockutil} --add "/Applications/Calendar.app" --no-restart --position 7
${dockutil} --add "/Applications/Contacts.app" --no-restart --position 8
${dockutil} --add "/Applications/Microsoft Office 2011/Microsoft Excel.app" --no-restart --position 9
${dockutil} --add "/Applications/Microsoft Office 2011/Microsoft PowerPoint.app" --no-restart --position 10
${dockutil} --add "/Applications/Microsoft Office 2011/Microsoft Word.app" --position 11
fi
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment