From: Bryan Larsen Date: Sat, 16 Jul 2005 23:23:55 GMT Subject: [PATCH 3/5] cogito: try harder to find gnu stat Message-ID: <20050716232341.7317.4962.sendpatchset@bryan-larsens-ibook-g4.local> In-Reply-To: <20050716232308.7317.56890.sendpatchset@bryan-larsens-ibook-g4.local> Look harder for gnu stat. Cogito has code to use awk if gnu stat is missing. Look harder for gnu stat under alternate names such as gstat and gnustat, avoiding the use of awk if possible. Signed-off-by: Bryan Larsen --- cg-Xlib | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cg-Xlib b/cg-Xlib --- a/cg-Xlib +++ b/cg-Xlib @@ -229,11 +229,11 @@ fi # Compatibility hacks: -# Fortunately none as of now. - export BROKEN_MKTEMP=1 del=$($(which mktemp) -t 2>/dev/null) && { rm $del; export BROKEN_MKTEMP=; } -has_stat=$(which stat 2>/dev/null) +has_stat=$(which gnustat 2> /dev/null || + which gstat 2> /dev/null || + which stat 2>/dev/null) [ "$has_stat" ] && $has_stat -c %s / 2>/dev/null >&2 || has_stat= has_gnudate=$(date -Rud "1970-01-01 UTC" 2>/dev/null)