#16 ✓released

Fix check-for-gpg.sh to also find "Fink"and "Mac Ports" gpg installations

Reported by time2ride | December 22nd, 2010 @ 10:32 PM | in 20110322

The problem is in the installation script check_for_gpg.sh:

PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/local/bin if( /usr/bin/which -s gpg ) then exit 0; fi

On Fink installations, gpg and gpg2 will be in /sw/bin by default. If users have modified their installation path (default /sw), then it will be elsewhere. The way this script is searching for it is limited and non-intuitive. To fix this, we can use ~/.profile: it is supposed to be automatically readable, and often (also with Fink) updates $PATH is updated in that file, so I think this would be a good option:

PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin" [ -r "$HOME/.profile" ] && . "$HOME/.profile" if( /usr/bin/which -s gpg ) then

I explicitly left out /opt/local/bin for MacPorts - if MacPorts doesn't install a ~/.profile that updates $PATH, then it should be put back in place, but if it does, this should be cleaner. This fixes installation on all Fink systems, and it might also help people which have MacPorts or even GnuPG itself on non-standard locations.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

People watching this ticket

Referenced by