diff options
author | Florian Pritz <bluewind@xinu.at> | 2012-01-04 15:42:12 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2012-01-04 15:43:41 +0100 |
commit | bcb55411af16c89a633c2e7c8e04769766a9fec7 (patch) | |
tree | 4566beeeaa32d4b76c8be464b09856ab6e24147a /functions | |
parent | a604f22b6c5afd3204d2e99d78f863736a795202 (diff) |
fix stat calls on non-gnu systems
Reported-by: Moritz Wilhelmy <moritz+git@wzff.de>
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'functions')
-rw-r--r-- | functions | 9 |
1 files changed, 9 insertions, 0 deletions
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 + |