From 5fa0083750dd2d93b811ab9b0e0e6ac7b5b17631 Mon Sep 17 00:00:00 2001 From: Joakim Roubert Date: Wed, 4 Mar 2020 16:13:43 +0100 Subject: [PATCH] Use contemporary $() instead of legacy `` in shell commands The "$()" form of command substitution solves a problem of inconsistent behavior when using backquotes and is recommended over the legacy backticks. Change-Id: I7f0df0535822b64680b6c076e930814417bf1480 Signed-off-by: Joakim Roubert --- Makefile | 2 +- tests/perf/scripts/test | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index bb2dff4602..73448b7c89 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ TARGETS := $(shell ls scripts | grep -v \\.sh) .dapper: @echo Downloading dapper - @curl -sL https://releases.rancher.com/dapper/v0.4.2/dapper-`uname -s`-`uname -m` > .dapper.tmp + @curl -sL https://releases.rancher.com/dapper/v0.4.2/dapper-$(uname -s)-$(uname -m) > .dapper.tmp @@chmod +x .dapper.tmp @./.dapper.tmp -v @mv .dapper.tmp .dapper diff --git a/tests/perf/scripts/test b/tests/perf/scripts/test index 5866907849..6dfa1191ac 100755 --- a/tests/perf/scripts/test +++ b/tests/perf/scripts/test @@ -3,8 +3,8 @@ test_load() { source scripts/config eval PRIVATE_KEY_PATH=$PRIVATE_KEY_PATH - EXPANDED_PRIV_KEY_PATH=`readlink -f $PRIVATE_KEY_PATH` - masterips=`terraform output -state=server/server.tfstate | grep k3s_server_ips | cut -d "=" -f 2` + EXPANDED_PRIV_KEY_PATH=$(readlink -f $PRIVATE_KEY_PATH) + masterips=$(terraform output -state=server/server.tfstate | grep k3s_server_ips | cut -d "=" -f 2) pushd tests/ docker run -v $EXPANDED_PRIV_KEY_PATH:/opt/priv_key \ -e KUBE_SSH_USER=ubuntu \ @@ -23,8 +23,8 @@ test_load() { test_density() { source scripts/config eval PRIVATE_KEY_PATH=$PRIVATE_KEY_PATH - EXPANDED_PRIV_KEY_PATH=`readlink -f $PRIVATE_KEY_PATH` - masterips=`terraform output -state=server/server.tfstate | grep k3s_server_ips | cut -d "=" -f 2` + EXPANDED_PRIV_KEY_PATH=$(readlink -f $PRIVATE_KEY_PATH) + masterips=$(terraform output -state=server/server.tfstate | grep k3s_server_ips | cut -d "=" -f 2) pushd tests/ docker run -e KUBE_SSH_USER=ubuntu \ -v $EXPANDED_PRIV_KEY_PATH:/opt/priv_key \