From 585bff3b6aad81ca3590492acfc66f4eda64909a Mon Sep 17 00:00:00 2001 From: Zhao Lei Date: Wed, 23 Sep 2015 19:00:01 +0800 Subject: [PATCH] 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: I84c23863e73684f0c22a90e447af69dec4789523 Signed-off-by: Zhao Lei --- diskimage-create/diskimage-create.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diskimage-create/diskimage-create.sh b/diskimage-create/diskimage-create.sh index 4c94e1ee3e..3df5ad113d 100755 --- a/diskimage-create/diskimage-create.sh +++ b/diskimage-create/diskimage-create.sh @@ -55,7 +55,7 @@ version() { # Figure out where our directory is located if [ -z $OCTAVIA_REPO_PATH ]; then - AMP_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + AMP_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) OCTAVIA_REPO_PATH=${OCTAVIA_REPO_PATH:-${AMP_DIR%/*}} fi