libtpms/tests/common
Stefan Berger f1e8b6c694 tests: Add license identifier to test cases
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2022-07-12 11:30:53 -04:00

15 lines
224 B
Plaintext

# SPDX-License-Identifier: BSD-3-Clause
# Get the size of a file in bytes
#
# @1: filename
function get_filesize()
{
if [[ "$(uname -s)" =~ (Linux|CYGWIN_NT-) ]]; then
stat -c%s $1
else
# OpenBSD
stat -f%z $1
fi
}