Skip to content

Instantly share code, notes, and snippets.

@ptb
Created July 28, 2011 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ptb/1112585 to your computer and use it in GitHub Desktop.
Save ptb/1112585 to your computer and use it in GitHub Desktop.
#!/bin/sh
USERTEMPLATE="$3/System/Library/User Template/English.lproj"
LIBPREFS='Library/Preferences'
TARGETFILE='SteerMouse.prefs'
/bin/cp -a "$USERTEMPLATE/$LIBPREFS/$TARGETFILE" "$HOME/$LIBPREFS/$TARGETFILE"
/usr/sbin/chown $USER:staff "$HOME/$LIBPREFS/$TARGETFILE"
/usr/bin/osascript -e 'tell application "System Events" to make new login item with properties { path: "/Applications/Utilities/SteerMouse.app/Contents/Resources/SteerMouse Manager.app", hidden: true } at end'
exit 0 ## Success
exit 1 ## Failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment