fix: can't get file size if gnubin/stat is already installed in homebrew

This commit is contained in:
M.Hosoi 2023-03-23 09:20:10 +09:00 committed by GitHub
parent 03a7e2e8bf
commit ac91a15aa9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,7 +31,7 @@ EOF
filesize() { filesize() {
case "$(uname -s)" in case "$(uname -s)" in
Linux*) stat -c "%s" $1;; Linux*) stat -c "%s" $1;;
Darwin*) stat -f "%z" $1;; Darwin*) /usr/bin/stat -f "%z" $1;;
*) echo "Unknown OS: $OS_NAME! This script runs only on Linux or Mac" && exit *) echo "Unknown OS: $OS_NAME! This script runs only on Linux or Mac" && exit
esac esac
} }