summaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2012-01-04 15:42:12 +0100
committerFlorian Pritz <bluewind@xinu.at>2012-01-04 15:43:41 +0100
commitbcb55411af16c89a633c2e7c8e04769766a9fec7 (patch)
tree4566beeeaa32d4b76c8be464b09856ab6e24147a /functions
parenta604f22b6c5afd3204d2e99d78f863736a795202 (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--functions9
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
+