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: I0f43bb936f956c99603dc15aaad9db851ecf0acd
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
This commit is contained in:
Zhao Lei 2015-09-23 18:49:26 +08:00
parent 6a42f662e2
commit c7c9647a0b
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ if [ ! -d "$PWD/.diagram-tools" ]; then
git clone "https://github.com/vidarh/diagram-tools.git" "$PWD/.diagram-tools"
fi
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
script_dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
img_dir="$script_dir/../doc/source/img"
echo "---- Updating task state diagram ----"