0

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?

  • Is this software an .app or command line - if a .app then the usual OSX way is to include the libraries in the bundle - then the user just copies the app - or just copy and build the app to a known place and install - e.g. /opt/dean/lib/libUSB – user151019 May 9 '14 at 22:17
1

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.

  • That would be an option but the people installing the software might not be aware of how to use a package management system. – Dean Apr 26 '14 at 12:06
  • @Dean then they won;'t have Macports etc installed, if they are using command line then they know enough to use a package manager. If not command line then it does not matter – user151019 Apr 26 '14 at 19:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .