mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-12-22 08:48:55 +00:00
Simplify the determination of the --cached option of the stat
This commit is contained in:
parent
01b3caa38c
commit
54293a66b3
@ -75,16 +75,10 @@ export SED_BUFFER_FLAG="--unbuffered"
|
||||
# Specifying cache disable option depending on stat(coreutils) version
|
||||
# TODO: investigate why this is necessary #2327
|
||||
#
|
||||
if grep -q -i -e 'ID=ubuntu' /etc/os-release && grep -q -i -e 'VERSION_ID="20.04"' /etc/os-release; then
|
||||
STAT_BIN=(stat)
|
||||
elif grep -q -i -e 'ID=debian' /etc/os-release && grep -q -i -e 'VERSION_ID="10"' /etc/os-release; then
|
||||
STAT_BIN=(stat)
|
||||
elif grep -q -i -e 'ID="centos"' /etc/os-release && grep -q -i -e 'VERSION_ID="7"' /etc/os-release; then
|
||||
STAT_BIN=(stat)
|
||||
elif [ "$(uname)" = "Darwin" ]; then
|
||||
STAT_BIN=(stat)
|
||||
else
|
||||
if stat --cached=never / >/dev/null 2>&1; then
|
||||
STAT_BIN=(stat --cache=never)
|
||||
else
|
||||
STAT_BIN=(stat)
|
||||
fi
|
||||
|
||||
function get_xattr() {
|
||||
|
Loading…
Reference in New Issue
Block a user