password-store

Simple password manager using gpg and ordinary unix directories
git clone https://git.zx2c4.com/password-store
Log | Files | Refs | README | LICENSE

commit 0916d4f1f7d35bb7420054fd148be500a678ea91
parent 71a1618e6e49c22bb78ec8e7b164a41df5440a77
Author: Jamie Couture <jamie.couture@gmail.com>
Date:   Tue,  9 Sep 2014 21:39:01 -0400

platform: find getopt in alternate osx locations

Some users may use MacPorts instead of Homebrew.  If brew fails to
return a prefix for getopt, check if the user has 'port' installed and
use the MacPort ${prefix} /opt/local.

Avoids an issue where pass terminates because getopt cannot be resolved
in the assumed location /usr/local/bin.  Provide support to resolve
absolute path of getopt from a MacPorts installation.

Signed-off-by: Jamie Couture <jamie.couture@gmail.com>

Diffstat:
Msrc/platform/darwin.sh | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/platform/darwin.sh b/src/platform/darwin.sh @@ -31,5 +31,5 @@ tmpdir() { mount -t hfs -o noatime -o nobrowse "$DARWIN_RAMDISK_DEV" "$SECURE_TMPDIR" || die "Error: could not mount filesystem on ramdisk." } -GETOPT="$(brew --prefix gnu-getopt 2>/dev/null || echo /usr/local)/bin/getopt" +GETOPT="$(brew --prefix gnu-getopt 2>/dev/null || which port 2>/dev/null && echo /opt/local || echo /usr/local)/bin/getopt" SHRED="srm -f -z"