From: Ben Crocker <[email protected]>

SC2231: Quote expansions in this for loop glob to prevent wordsplitting.
SC2086: Double quote to prevent globbing and word splitting.

Signed-off-by: Ben Crocker <[email protected]>
---
 redhat/update_scripts.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/redhat/update_scripts.sh b/redhat/update_scripts.sh
index 5c3dbaeb9459..9196e795a84c 100755
--- a/redhat/update_scripts.sh
+++ b/redhat/update_scripts.sh
@@ -1,12 +1,12 @@
 #!/bin/sh
 
-if [ -z $1 ]; then
+if [ -z "$1" ]; then
        exit 1
 fi
 
-TARGET=$1
+TARGET="$1"
 
-for i in $RPM_SOURCE_DIR/*.$TARGET; do
+for i in "$RPM_SOURCE_DIR"/*."$TARGET"; do
        NEW=${i%.$TARGET}
-       cp $i $NEW
+       cp "$i" "$NEW"
 done
-- 
GitLab
_______________________________________________
kernel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]

Reply via email to