summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2019-01-29 16:46:15 +0100
committerDirk Engling <erdgeist@erdgeist.org>2019-01-29 16:46:15 +0100
commitaf046f01f8350f1bc9e585656cb56f3508a65d7f (patch)
tree329a04f664fd362440097ccb5bc22b8e941c529d
parentfda41e399edf12c65b177ffbb98bc511b8f6463a (diff)
Make getting the size platform dependent
-rwxr-xr-xmakecolumns.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/makecolumns.sh b/makecolumns.sh
index b73dffe..b15a2dd 100755
--- a/makecolumns.sh
+++ b/makecolumns.sh
@@ -82,7 +82,10 @@ do_processfile_version_3() {
82} 82}
83 83
84size() { 84size() {
85 stat -f %z `printf %0${filename_len}d "$1"` 85case `uname -s` in
86 *BSD|Darwin) stat -f %z `printf %0${filename_len}d "$1"`;;
87 *) stat -c %s `printf %0${filename_len}d "$1"`;;
88esac
86} 89}
87 90
88get_dword() { 91get_dword() {