rally/samples/plugins/unpack_plugins_samples.sh
Zhao Lei a0e99db0d4 Remove quotes from subshell call in bash script
Always no quotes for $() statement.

We don't need quotes to hold blanks in result:
 # i=$(echo 1 2 3)
 # echo $i
 1 2 3
 #

These quotes can make something wrong in some case:
 # i=$(echo '!')
 #
 # i="$(echo '!')"
 -bash: !: event not found
 #

No real problem for current code, only to use a better code style.

Change-Id: Iabb98ba4db4f04b4f10c944184356dab648af3a6
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
2015-09-23 18:29:44 +08:00

12 lines
468 B
Bash

#!/bin/bash
samples_unpacked_dir=$(dirname "${BASH_SOURCE[0]}")
dirs=( $(find "$samples_unpacked_dir" -maxdepth 1 -type d -printf '%P\n') )
samples=~/.rally/plugins/samples
mkdir -p "$samples"
for dir in "${dirs[@]}"; do
cp -r $samples_unpacked_dir/$dir $samples
printf "\nTo test $dir plugin run next command:\n"
printf "rally task start --task $samples/$dir/test_$dir.yaml\n"
printf "or \nrally task start --task $samples/$dir/test_$dir.json\n"
done