Skip to content

Commit 8dd002d

Browse files
tobhemarcan
authored andcommitted
Replace bashisms with posix shell alternatives.
Signed-off-by: Tobias Heider <[email protected]>
1 parent 2cb6cb4 commit 8dd002d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

version.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ if [ -n "$M1N1_VERSION_TAG" ]; then
77
version="$M1N1_VERSION_TAG"
88
elif [ -e ".git" ]; then
99
version="$(git describe --tags --always --dirty)"
10-
elif [ "${dirbase:0:5}" == "m1n1-" ]; then
11-
version="${dirbase:5}"
10+
elif [ "$(echo "${dirbase}" | cut -c1-5)" = "m1n1-" ]; then
11+
version=$(echo "${dirbase}" | cut -c6-)
1212
version="v${version##v}"
1313
else
1414
version="unknown"

0 commit comments

Comments
 (0)