[OS-BUILD PATCH 16/20] [redhat] merge-subtrees.sh: Fix syntax flagged by shellcheck

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

 



From: Ben Crocker <bcrocker@xxxxxxxxxx>

SC2162: read without -r will mangle backslashes
Globally disable:
SC2086 (Double quote to prevent globbing and word splitting)

WARNING: I don't think this script ever would have worked, before
or after shellcheck-suggested changes; I think the logic should be:

for entry in $entries; do
    git subtree pull --prefix=$entry  master
done

Signed-off-by: Ben Crocker <bcrocker@xxxxxxxxxx>
---
 redhat/scripts/merge-subtrees.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/redhat/scripts/merge-subtrees.sh b/redhat/scripts/merge-subtrees.sh
index 02b8e8d37ff6..6de7879799ea 100755
--- a/redhat/scripts/merge-subtrees.sh
+++ b/redhat/scripts/merge-subtrees.sh
@@ -1,5 +1,5 @@
 #!/bin/sh
-
+# shellcheck disable=SC2086
 # In newer versions of git-subtree the git repo is not explicitly required,
 # however, given the wide variance of git versions we need to include it.
 
@@ -7,6 +7,6 @@ entries="
 	redhat/rhdocs git://git.host.prod.eng.bos.redhat.com/rhkernel-docs
 	"
 
-echo $entries | while read entry; do
+echo $entries | while read -r entry; do
 	git subtree pull --prefix=$entry  master
 done
-- 
GitLab
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
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/kernel@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux