From b10e13c998b0719912215b921dad27c9ed03ee80 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 1 Mar 2021 11:40:29 +0100 Subject: [PATCH] removed dependency to awk in upgrade script --- setup/upgrade.sh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/setup/upgrade.sh b/setup/upgrade.sh index 5f4277c61..4075e4969 100644 --- a/setup/upgrade.sh +++ b/setup/upgrade.sh @@ -37,14 +37,6 @@ jq() { config() { - echo -ne "Checking dependency... " - if ! command -v awk || ! [[ $(awk -W version) =~ ^GNU ]] - then - echo "Please install GNU Awk before running this script." - echo "gawk was not found, exiting..." - exit 1 - fi - echo -ne "Checking user... " if [[ "$(whoami)" != "root" ]] && ! groups | grep docker then @@ -77,7 +69,7 @@ version_check() { VERSION=$(docker-compose exec -T "$SERVICE" cat .fabmanager-version) if [[ $? = 1 ]]; then - VERSION=$(docker-compose exec -T "$SERVICE" cat package.json | grep version | awk 'BEGIN { FS = "\"" } ; {print $4}') + VERSION=$(docker-compose exec -T "$SERVICE" cat package.json | jq -r '.version') fi if verlt "$VERSION" 2.8.3; then