Don't bother reading empty version files

This commit is contained in:
Ville Skyttä 2022-03-08 20:56:22 +02:00
parent e4f61e67e2
commit cec6d46792

View file

@ -5,7 +5,7 @@ set -e
VERSION_FILE="$1"
if [ -e "$VERSION_FILE" ]; then
if [ -s "$VERSION_FILE" ]; then
# Read the first word from the specified version file. Avoid reading it whole.
IFS="${IFS}"$'\r'
words=( $(cut -b 1-1024 "$VERSION_FILE") )