PackageMaker: Add to PATH?

Joined
Jun 1, 2010
Messages
1
Reaction score
0
Points
1
Hi folks,

I'm creating a distribution package for my app. It's a command-line app, so I felt the best place to install it was /usr/local/bin. Unfortunately, that's not in users' PATH by default unless they've installed XCode (as I have).

What's the easiest way to get the distribution to automatically add /usr/local/bin to the system PATH? Should I use a bash script?

I don't just want to append a line to /etc/profile, as the user might already have it set. And there are various places where that might happen.

Thanks,
Lyle
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Why not add a symlink from /usr/bin to your program in /usr/local/bin? This way, you can be sure that if they try to execute your program, they will have no worries.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top