Replace bashisms with posix shell alternatives.

Signed-off-by: Tobias Heider <me@tobhe.de>
This commit is contained in:
Tobias Heider 2022-12-15 23:37:48 +01:00 committed by Hector Martin
parent 2cb6cb46ca
commit 8dd002d4f7

View file

@ -7,8 +7,8 @@ if [ -n "$M1N1_VERSION_TAG" ]; then
version="$M1N1_VERSION_TAG" version="$M1N1_VERSION_TAG"
elif [ -e ".git" ]; then elif [ -e ".git" ]; then
version="$(git describe --tags --always --dirty)" version="$(git describe --tags --always --dirty)"
elif [ "${dirbase:0:5}" == "m1n1-" ]; then elif [ "$(echo "${dirbase}" | cut -c1-5)" = "m1n1-" ]; then
version="${dirbase:5}" version=$(echo "${dirbase}" | cut -c6-)
version="v${version##v}" version="v${version##v}"
else else
version="unknown" version="unknown"