gluon/scripts/filesize.sh
Matthias Schiffer 21b3dd3259
build: add file size field to manifest lines
We would like to check the file size instead of downloading indefinitely.
The file size is added in another copy of the manifest lines, which is
ignored by older autoupdater implementations.
2017-12-28 22:57:37 +01:00

17 lines
278 B
Bash
Executable File

#!/bin/sh
check_command() {
which "$1" >/dev/null 2>&1
}
if check_command gnustat; then
gnustat -c%s "$@"
elif check_command gstat; then
gstat -c%s "$@"
elif check_command stat; then
stat -c%s "$@"
else
echo "$0: no suitable stat implementation was found" >&2
exit 1
fi