corrects gnu version of stat

This commit is contained in:
Tilde Black Admin 2020-06-11 00:48:12 +00:00 committed by Gitea
parent 4fe8a4f229
commit f8dd46482b
1 changed files with 2 additions and 2 deletions

4
tilde
View File

@ -26,12 +26,12 @@ VERSION="0.0.1"
if stat -c"%U" /dev/null >/dev/null 2>/dev/null ; then if stat -c"%U" /dev/null >/dev/null 2>/dev/null ; then
# GNU environment # GNU environment
stat_func () { stat_func () {
stat -f %Su "$1" stat -c '%U' "$1"
} }
else else
# BSD environment # BSD environment
stat_func () { stat_func () {
stat "$1" | awk '{print $5}' stat -f %Su "$1"
} }
fi fi