summaryrefslogtreecommitdiff
path: root/scripts/stat
blob: bf9136338cc23695e31604e56aa121b07d32e34b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env bash
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

declare -a opts
while [[ "$1" ]]; do
	case "$1" in
	-c) shift ;;
	-f) shift ;;
	*) opts+=("$1") ;;
	esac
	shift
done

if /usr/bin/stat -qs .>/dev/null 2>&1; then 
  /usr/bin/stat -f %z "${opts[@]}"
else 
  /usr/bin/stat -c %s "${opts[@]}"
fi