[PATCH 2/5] Speed up the brew-based gnu-getop lookup

Artur Sterz pass-maillinglist at artursterz.de
Tue Oct 30 18:06:25 CET 2018


If gnu-getopt is not installed in the brew default path,
brew --prefix gnu-getopt will be used, which is annoyingly slow.
brew --prefix is way faster and should be prefered.
---
 src/platform/darwin.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/platform/darwin.sh b/src/platform/darwin.sh
index e00b928..bc232c3 100644
--- a/src/platform/darwin.sh
+++ b/src/platform/darwin.sh
@@ -44,7 +44,7 @@ qrcode() {
 }
 
 GETOPT="$(PATH="/usr/local/opt/gnu-getopt/bin:/opt/local/bin:/usr/local/bin" command -v getopt)" || \
-GETOPT="$(brew --prefix gnu-getopt 2>/dev/null)/bin/getopt" || \
+GETOPT="$(brew --prefix 2>/dev/null)/opt/gnu-getopt/bin/getopt" || \
 GETOPT="$(which port &>/dev/null && echo /opt/local/bin/getopt)"
 
 SHRED="srm -f -z"
-- 
2.17.1 (Apple Git-112)



More information about the Password-Store mailing list