Skip to content

Instantly share code, notes, and snippets.

@neilmartin83
Last active October 26, 2021 23:45
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neilmartin83/d8ce01ec893d25b1031d to your computer and use it in GitHub Desktop.
Save neilmartin83/d8ce01ec893d25b1031d to your computer and use it in GitHub Desktop.
#!/bin/sh
## postinstall
# This script is for Pro Tools 11.3 - it performs functions that would normally ask for admin privileges when Pro Tools is launched for the first time.
# It checks that Pro Tools has already been installed and will not run if it hasn't.
if [[ -d "$3/Applications/Pro Tools.app" ]]; then
echo "Pro Tools has been installed, running post-install tasks..."
# Let's declare a couple of variables because the author is lazy
PHT_SHOE="$3/Library/PrivilegedHelperTools/com.avid.bsd.shoe"
PLIST="$3/Library/LaunchDaemons/com.avid.bsd.shoe.plist"
# Copy the com.avid.bsd.shoe Helper Tool
/bin/cp -f "$3/Applications/Pro Tools.app/Contents/Library/LaunchServices/com.avid.bsd.shoe" $PHT_SHOE
/usr/sbin/chown root:wheel $PHT_SHOE
/bin/chmod 544 $PHT_SHOE
# Create the Launch Daemon Plist for com.avid.bsd.shoe
/bin/rm "$PLIST" # In case Pro Tools has been updated from a previous version
/usr/bin/defaults write $PLIST Label -string com.avid.bsd.shoe
/usr/bin/defaults write $PLIST MachServices -dict com.avid.bsd.shoe -bool true
/usr/bin/defaults write $PLIST ProgramArguments -array /Library/PrivilegedHelperTools/com.avid.bsd.shoe
/bin/chmod 644 $PLIST
/bin/launchctl load $PLIST
# Remove old workspace to avoid nag message if upgrading from a previous version of Pro Tools
/bin/rm "$3/Users/Shared/Pro Tools/Workspace.wksp"
# Done.
else
echo "Pro Tools is not installed, will not run post-install tasks"
fi
exit 0
@neilmartin83
Copy link
Author

Revised PT 11 postinstall script - no need to create plug-in folders - the Shoe Priveleged Helper Tool does everything for us!

@neilmartin83
Copy link
Author

Many thanks to rmanly for the original script this is based on!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment