Browse Source

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 <joakimr@axis.com>
pull/1494/head
Joakim Roubert 5 years ago
parent
commit
5fa0083750
  1. 2
      Makefile
  2. 8
      tests/perf/scripts/test

2
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

8
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 \

Loading…
Cancel
Save