[dim PATCH 05/10] dim: double quote array expansions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix shellcheck SC2068: Double quote array expansions, otherwise they're
like $* and break on spaces.

Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
---
 Makefile | 1 -
 dim      | 8 ++++----
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index d93cf2023949..cf46a225d146 100644
--- a/Makefile
+++ b/Makefile
@@ -29,7 +29,6 @@ SC_EXCLUDE := \
 	-e SC2035 \
 	-e SC2046 \
 	-e SC2053 \
-	-e SC2068 \
 	-e SC2086 \
 	-e SC2089 \
 	-e SC2090 \
diff --git a/dim b/dim
index 6bc3cb9d66b4..2263620a2d7d 100755
--- a/dim
+++ b/dim
@@ -1216,7 +1216,7 @@ function prep_pull_mail_overview
 	if [ "$#" = "0" ]; then
 		echo "*** insert pull request overview here ***"
 	else
-		for tag in $@ ; do
+		for tag in "$@"; do
 			obj=`git rev-parse $tag`
 			if [[ `git cat-file -t $obj` == "tag" ]] ; then
 				echo $tag:
@@ -1231,7 +1231,7 @@ function prep_pull_mail_overview
 function prep_pull_mail
 {
 	prep_pull_mail_greetings > ~/tmp/dim-pull-request
-	prep_pull_mail_overview $@ >> ~/tmp/dim-pull-request
+	prep_pull_mail_overview "$@" >> ~/tmp/dim-pull-request
 	prep_pull_mail_signature >> ~/tmp/dim-pull-request
 }
 
@@ -1273,11 +1273,11 @@ dim_alias_fw=for-each-workdirs
 function dim_for_each_workdirs
 {
 	cd $DIM_PREFIX/$DIM_DRM_INTEL
-	$@
+	"$@"
 	for branch in $dim_branches ; do
 		if [[ -d $DIM_PREFIX/$branch ]] ; then
 			cd $DIM_PREFIX/$branch
-			$@
+			"$@"
 		fi
 	done
 }
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux