Use double quotes to prevent globbing and word splitting.

This commit is contained in:
Joachim Bauch 2023-10-26 14:10:33 +02:00
parent 4e140dd334
commit e972f911b0
No known key found for this signature in database
GPG key ID: 77C1D22D53E15F02

View file

@ -6,7 +6,7 @@ VERSION=
if [ -s "$ROOT/../version.txt" ]; then
VERSION=$(cat "$ROOT/../version.txt" | tr -d '[:space:]')
fi
if [ -z $VERSION ] && [ -d "$ROOT/../.git" ]; then
if [ -z "$VERSION" ] && [ -d "$ROOT/../.git" ]; then
TAG=$(git tag --points-at HEAD | sed 's/v//')
if [ "$1" == "--tar" ]; then
VERSION=$(git describe --dirty --tags --always | sed 's/debian\///g')
@ -17,7 +17,7 @@ if [ -z $VERSION ] && [ -d "$ROOT/../.git" ]; then
fi
fi
if [ -z $VERSION ]; then
if [ -z "$VERSION" ]; then
VERSION=unknown
fi