From 627f86392f082b9a42bd9efeb59e7ee9374932b3 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Thu, 27 Jan 2022 10:37:03 +0300 Subject: Fix 'Bad substitution' issue In posix shell, string indexing is undefined. This commit replaces the string indexing with a more portable implementation. --- bin/genenetwork2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/genenetwork2 b/bin/genenetwork2 index ce3678e4..7669a89a 100755 --- a/bin/genenetwork2 +++ b/bin/genenetwork2 @@ -59,7 +59,7 @@ else echo INFO: GN2 is running from a source tree GIT_HASH=$(git rev-parse HEAD) GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) - export GN_VERSION=$GN2_ID:$(cat $GN2_BASE_DIR/etc/VERSION)-$GIT_BRANCH-${GIT_HASH:0:9} + export GN_VERSION="${GN2_ID}:$(cat ${GN2_BASE_DIR}/etc/VERSION)-${GIT_BRANCH}-$(echo ${GIT_HASH} | cut -c1-9)" fi echo GN_VERSION=$GN_VERSION -- cgit v1.2.3