I'm writing an install script for some software that depends on libUSB being installed however I need to check if macports or fink is installed, if they are not install homebrew. How can I check to see if the macports or fink are installed in a shell script?
Mac – Checking for MacPorts or Fink installed
bashfinkmacports
Related Question
- Mac – What are pros and cons for MacPorts, Fink and Homebrew
- Mac – Can homebrew and macports work together to let Firefox-X11 be installed
- Mac – Listing all files installed by some MacPorts package
- Mac – Is it possible to create an own MacPorts (proxy)repository/server
- MacOS – Fink help!! Not installing in Mavericks!
- MacOS – How to not install MacPorts dependency if installed elsewhere
- Mac – Homebrew asked me to move macports now it does not work
Best Answer
Macports will have /opt/local/lib/port as the executable that does all the work.
Fink's main executable is fink - I think it is in /sw/bin/fink but as I don't have fink installed I cannot confirm
You also need to see if there is anything in /usr/local that could conflict with home-brew.
A better alternative, as you are using a package manager, is write your installs a script in all of the package managers, rather than introduce yet another installer
The usual OSX way is to create an app with all the required shared libraries inside the app bundle so there is no need for a special install just copy the app.