From 867289267dae90fe35be67644585e8fef494c96b Mon Sep 17 00:00:00 2001
From: Jean SIMARD <simard.jean@gmail.com>
Date: Sat, 21 Sep 2013 21:59:49 +0200
Subject: [PATCH] Fix the looking for `getopt' program

Brew may give a result for `getopt' even if it doesn't exist.  Moreover,
Macports may have been installed and the default is `/opt/local/bin/getopt'.
Make use of `which' to find `getopt'.
---
 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 4e94941..309c0ce 100644
--- a/src/platform/darwin.sh
+++ b/src/platform/darwin.sh
@@ -31,4 +31,4 @@ tmpdir() {
 	mount -t hfs -o noatime -o nobrowse "$ramdisk_dev" "$tmp_dir" || exit 1
 }
 
-GETOPT="$(brew --prefix gnu-getopt 2>/dev/null || echo /usr/local)/bin/getopt"
+GETOPT="$(which getopt)"
-- 
1.8.3.1

