From bcb55411af16c89a633c2e7c8e04769766a9fec7 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 4 Jan 2012 15:42:12 +0100 Subject: fix stat calls on non-gnu systems Reported-by: Moritz Wilhelmy Signed-off-by: Florian Pritz --- functions | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 functions (limited to 'functions') diff --git a/functions b/functions new file mode 100644 index 0000000..1dc76d3 --- /dev/null +++ b/functions @@ -0,0 +1,9 @@ +#!/bin/sh + +# the calling conventions for stat(1) are highly system dependent +STAT='stat -c %s' # GNU stat(1) is the default since most people have it +case "`uname -s`" in + *BSD) STAT='stat -f %z';; + Minix) STAT='stat -size';; +esac + -- cgit v1.2.3-24-g4f1b